Hello,
I am having trouble on my site Lockerz.rack111.com where when you login the login box when you hit submit clears and then when you type your info in again then the login box works.
here is the code:
Code: <?php
if(isset($_SESSION['username'])) {
$username = $_SESSION['username'];
$query = mysql_query("SELECT id FROM `members` WHERE `username` = '$username'") or die(mysql_error());
$results = mysql_num_rows($query);
$id = $results['id'];
echo "welcome <font color='lightblue'>$username</font>,
<a href='./profile.php?id=$userID '>Profile</a> - <a href='./logout.php'>Logout</a>";
} else {
$final_report = "-";
if(isset($_POST['login'])){
$username= trim($_POST['username']);
$password = trim($_POST['password']);
if($username == NULL OR $password == NULL){
$final_report = "Please complete all the fields below..";
}else{
$check_user_data = mysql_query("SELECT * FROM `members` WHERE `username` = '$username'") or die(mysql_error());
if(mysql_num_rows($check_user_data) == 0){
$final_report = "This username does not exist..";
}else{
$get_user_data = mysql_fetch_array($check_user_data);
if($get_user_data['password'] == $password){
$start_idsess = $_SESSION['username'] = "".$get_user_data['username']."";
$start_passsess = $_SESSION['password'] = "".$get_user_data['password']."";
?>
<?php
}}}}
?>
<font color="white">
<form action="" method="post">
<table width="312" align="center">
<tr>
<?php echo "<font color='white' size='1'>$final_report </font>"; ?><td width="120"><font color="white">Username:</font></td>
<td width="180"><input type="text" name="username" size="30" maxlength="25" STYLE="font-size: xx-small;"></td>
</tr>
<tr>
<td><font color="white">Password:</font></td>
<td><input type="password" name="password" size="30" maxlength="25" STYLE="font-size: xx-small;"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="login" value="Login" STYLE="font-size: xx-small;"></td>
</tr>
</table>
</font>
</form>
<?php
}
?>
Force download script not handling files with spaces properly
I have a regular old php force download script, uses this code:Code: header("Cache-Control: "); header("Pragma: "); header("Content-type: application/octet-stream");
Problem with HTML form
Hello,I made a HTML form with some fields and check box.Everything works fine except when i receive the email, only fields appear in the email not the content of the check box.I have attached the
Multiple PHP errors when clicking a link..and..removing a ghost..
Hi - I have 2 problems with a new website - homeswapvacations.com, which I need help solving.The first problem - In the left column (on all pages) is "Featured Listing" column (in the admin
removing space from the end of a variable
i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0mdsb2JgbA9ECgR8GgMfWSpVL2ljb24vMC84MDAwIAABAAAAAP3Wg70=.jpg"but for some reason it is breaking
Getting Subdomain Name With PHP?
I want to grab the subdomain name with PHP so I can generate database queries.for example my subdomain is san-jose.mydomain.comHow would I go about grabbing the subdoman name with PHP? Thanks!
unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
array_diff weirdness
I'm using the following bit of code$diff = array_diff($pids, $pidlist); $diff = array_values($diff); //reindex array to remove empties//output to $discrepancyprint_r($diff);exit;Both $pids and
records between 2 dates
Hello all,
Little problem with form insertion in MySQL, Please help!!!
Hi!,I'm a little bit new with php and I have a little issue here. I created a webform to insert some infos into a MySQL database. The weird thing is that some of the infos is correctly inserted and
filesize problem
i use ubuntu 9.10 and i have mountet a folder from an windows/mount/FOLDER/mount/FOLDER/FILE.txti try to find out the size of folder : FILE.txtPHP Warning: filesize(): stat failed for