473,327 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

For some reason my script is changing a session.

Ajm113
161 100+
I find it odd all my scripts doesn't change the logged in person's name on any other page, but my threads page. I have no idea why! I looked over the script and saw nothing changing the session (Variable Wise) changing it.

I commented out some off the parts on my large script, but it seems the problem points to here though it doesn't make sence.

It looks it's changing the myemail session.
[PHP]<?
if(@$_SESSION['myemail'] != "") {


print "<a href=\"login.php?type=logout\">Log Out</a> | <a href=\"account.php\">Account Settings</a>";

$link2=mysql_connect('localhost','root','password' );

mysql_select_db('accountdb');

$email32 = $_SESSION['myemail'];

$query = "SELECT * FROM accountTbl WHERE email='$email32'";
$result = mysql_query($query, $link2) or die(mysql_error());

$row = mysql_fetch_array( $result) or die(mysql_error());


$avatar = $row['avatar'];
$email = $row['email'];
$myPower = $row['power'];
$points = $row['points'];
$myId1 = $row['id'];

if($avatar == ""){
$avatar = "http://img1.jurko.net/avatar_5450.jpg";
}

echo "<br><br>Welcome $email <br>" .
"points: $points <br><br>" .
"Avatar:<br> <img src=\"$avatar \" width=\"100px\" height=\"100px\"><br><br>";

//......

?>[/PHP]
Jun 27 '08 #1
1 1233
realin
254 100+
put session_start();

on top of the page after <?php

that should do if i understood ur problem correctly :)
Jun 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Will Seay | last post by:
At the end of this message I've pasted a script we're trying to modify slightly. I don't believe it is VBscript or javascript but these are the closest groups I could find with my limited...
16
by: Fox | last post by:
I merged and modified these script which work perfectly fine as long as I use server.execute to access the VBS part (which is itself in another ASP file). When these I use a session variable to...
3
by: M Wells | last post by:
Hi All, Just wondering how you go about changing the value of a session cookie via javascript? I have a PHP page that sets a session cookie when it first loads. I'd like to be able to change...
4
by: | last post by:
I'm not sure what to think of this. In the appliacation, upon postback, users screens will get mixed up. Meaning... Perhaps on my screen im working with a particular set of data. I click a button...
2
by: Tom | last post by:
I hope someone can help me figure out what's going on here. I've re-read the section on sessions at php.net and Googled this high and low but I haven't found anything that quite explains my...
5
by: Mirovk | last post by:
The onclick action associated to my form´s radio buttons call to a vbscript were the session values are changed, this happens correctly but with the onclick action associated to my continue button...
7
by: Erwin Moller | last post by:
Hi group, Does anybody know what causes the following Warning? __________________________________________________ Warning: Unknown(): Your script possibly relies on a session side-effect...
10
by: _Who | last post by:
Given Request.Cookies and Response.Cookies in asp.net is there any reason to ever use javascript or any other method to use cookies? Thanks
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.