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
}
?>
Function to extract email attachments using PHP IMAP
function extract_attachments($connection, $message_number) { $attachments = array(); $structure = imap_fetchstructure($connection, $message_number); if(isset($structure->parts)
Need help with basic sql
Hi,
PHP FTP Can't upload Big FIles
Anyone had any success using FTP to upload a file say 90m?im using ftp_put and it returns false. BUT the file DOES upload just fine. I even downloaded and tested it, its the full file. But ftp_put
help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:Parse error: syntax error, unexpected T_ELSE in .../scripts/php/loginform2.php on line 40when I change that line I get another on
Writing to the middle of a file
Hi I have a bit of a problem. Is there any way i can write some text to a middle of a text file. For instance on line 20? I know how to write text to the bottom of the file but not how i can get it to
send message to the java application
Oracle 10g with Windows platform.
multipart emiail forms
Hi All, I am new to the boards and I've been working on a form (which is rather massive, imo) and i've been looking online at other peoples php examples for multipart emails. The code i am using /
Where is my php.ini???
HiFirst off - apologies - i'm not a coder so this may sound very amateur.I'm having an issue with files being uploaded via a submission form. Files under 2mb are fine. Files over 2mb are not. I've
drop-down with sub-category appear
Hello,i know how to build a simple dro-down list, im looking for a code when im gonna choose from the select box something a new drop-down will appear next to the default one with
Sending an SMS Message with ASP.NET
Often times it may be a requirement for your web application to send an SMS message. Such examples would be reminders, password resetting, and spam.Q: Can I have some code to send an SMS message?A: