
archonis
Members-
Posts
19 -
Joined
-
Last visited
Never
Everything posted by archonis
-
Im using a login script that i can not get it to work to save my life. Sometimes it says its there then other times I get a 404. If i leave to username set to username and password set to password i get a login error as i should. If i type is a true username and a true password, opps 404. I just dont get it. Here is my login.php code, <form name="form1" method="post" action="checklogin.php"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"> <?php if ($myusername == "") { ?> <input name="myusername" type="text" id="myusername" value="Username" size="15" /> <input name="mypassword" type="password" id="mypassword" value="password" size="15" /> <input type="submit" name="Submit" value="Login" /> <?php } else { echo "Welcome back " . $myusername; } ?> </div></td> </tr> <tr> <td><div align="center"> <?php if ($myusername == "") { ?> • <a href="lostusernameandpassword.php">Forgot Password</a> • <a href="signup.php">New User</a> • <?php } else { echo "<a href=\"#\">Logout</a>"; } ?> </div></td> </tr> </table> </form> This is my checklogin.php code. <?php ini_set("session.cookie_domain"," .mytowndate.com"); session_start(); $host="localhost"; // Host name $username="*******"; // Mysql username $password="********"; // Mysql password $db_name="trevors4_MTD"; // Database name $tbl_name="members"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $myusername = $_POST ['myusername']; $mypassword = $_POST ['mypassword']; $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql); $count = mysql_num_rows ($result); if($count ==1) { session_register ("myusername"); session_register ("mypassowrd"); header("location:login_success.php"); } else { echo "Wrong Username or Password"; } ?> Now my login_sussece.php <? ini_set("session.cookie_domain"," .mytowndate.com"); session_start(); $pagetype = "blog" $myusername = $_SESSION['myusername']; $mypassword = $_SESSION['mypassword']; if ($pagetype == 'blog') { $host="localhost"; // Host name $dbusername="**********"; // Mysql username $password="********"; // Mysql password $db_name="trevors4_MTD"; // Database name $tbl_name="members"; // Table name // Connect to server and select databse. mysql_connect("$host", "$dbusername", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $date = date("Y-m-d"); mysql_query("UPDATE members SET online = '$date' WHERE username='$myusername'") or die(mysql_error()); // Make a MySQL Connection $query = "SELECT * FROM members WHERE username = '$myusername'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); // If this does not work lets use SSID if ($row['school'] == '') { $fname=$row['fname']; $lname=$row['lname']; $email=$row['email']; $age=$row['age']; $city=$row['city']; $state=$row['state']; $zip=$row['zip']; $gender=$row['gender']; $herefor=$row['herefor']; $showmyphoto = "myphoto.jpg"; header("Location: http://www.mytowndate.com/updateprofile.php?username=".$username."&password=".$password."fname=".$fname."&lname=".$lname."&email=".$email."&age=".$age."&city=".$city."&state=".$state."&zip=".$zip."&gender=".$gender."&herefor=".$herefor); } header("Location: http://www.mytowndate.com/cp/inbox.php?sid=".session_id()); } else { echo "There was an ERROR! OPPS!"; echo $pagetype; } ?> <html> <body> <? echo $pagetype; echo $username; echo $password; ?> Login Successful </body> </html>
-
no more help?
-
its almost there but i have a border and the last two gets droped off http://www.mytowndate.com/modrecent.php
-
this is where i am at. its still a no go // Connect to server and select databse. mysql_connect("$host", "$dbusername", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $date = date("Y-m-d"); $result = mysql_query("SELECT * FROM members ORDER BY online DESC limit 9") or die(mysql_error()); echo '<table width=/"70%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/"><tr><td width=/"30%/"><tr>'; while($row = mysql_fetch_array($result)) { if($x == 3){ echo '</tr></table>'; echo '<table width=/"70%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/"><tr><td width=/"30%/"><tr>'; $x=0; } else{ $x++; ?> <td><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?></td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style1"><?php echo $row['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table></td> <?php } }echo '</tr></table>'; ?></body> </html>
-
Anyhow I can't find out how to make it look like this 123 457 789 I been searching for days and what I do find and alter it does not work right
-
Prevent PHP mail( ) from appending hostname to from address
archonis replied to jrw4's topic in PHP Coding Help
There is some error in your statment about IPs but i'm not here to disprove anyone. As long as the to email has the @something.com it does not matter about the from. This is how spammers work. You should be able to make the from header anything you want. That is nothing more then a cover up. In the stmp or imap or pop 3 the real host name is still there but is only osed as a trace. The from is just so the end user will have a reply back. -
the end result is to sort the database by login dates and display the last 9 that has logged in. Each block is a user. 123 456 789 and not 111 222 333 444 555 666 777 888 999 Yea, Thanks about the photo thing. Im working on that.
-
REALY NO!, Yes i understand that! Did you look at the link i provided? If you did you will see i have no problem putting them on top of each other. But there is rows of three. I dont know how to do part so it looks like this. 111 222 333 and not 123 456 789
-
Prevent PHP mail( ) from appending hostname to from address
archonis replied to jrw4's topic in PHP Coding Help
Oh, I forgot to tell you. You can make that say anything you want. "$headers = "From:YOUR BOSS NAME" becomes a nice joke. -
Prevent PHP mail( ) from appending hostname to from address
archonis replied to jrw4's topic in PHP Coding Help
Dont add the @here.com -
take a look at http://www.mytowndate.com/modrecent.php I had a feeling this was going to happen. // Connect to server and select databse. mysql_connect("$host", "$dbusername", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $date = date("Y-m-d"); $result = mysql_query("SELECT * FROM members ORDER BY online DESC limit 9") or die(mysql_error()); while($row = mysql_fetch_array($result)) { ?> <table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="30%"><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style1"><?php echo $row['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table></td> <td width="33%"><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style1"><?php echo $row['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table></td> <td width="37%"><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style1"><?php echo $row['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table></td> </tr> </table> <?php } ?> </body> </html>
-
This is a include file. Its one table and in that table its 3 rows with 3 blocks. here is a url http://www.mytowndate.com/modrecent.php
-
Prevent PHP mail( ) from appending hostname to from address
archonis replied to jrw4's topic in PHP Coding Help
<?php $to = "[email protected]"; $subject = "My sms test."; $message = "Hello, how are you?"; $headers = "From: [email protected]\r\n"; $headers .= "Reply-To: [email protected]\r\n"; $headers .= "Return-Path: [email protected]\r\n"; if ( mail($to,$subject,$message,$headers) ) { echo "The SMS has been sent!"; } else { echo "The SMS has failed!"; } ?> -
Prevent PHP mail( ) from appending hostname to from address
archonis replied to jrw4's topic in PHP Coding Help
You edit the headers. I do it all the time so it does not show my server name in the e-mail. <?php $to = "[email protected]"; $subject = "My email test."; $message = "Hello, how are you?"; $headers = "From: [email protected]\r\n"; $headers .= "Reply-To: [email protected]\r\n"; $headers .= "Return-Path: [email protected]\r\n"; $headers .= "CC: [email protected]\r\n"; $headers .= "BCC: [email protected]\r\n"; if ( mail($to,$subject,$message,$headers) ) { echo "The email has been sent!"; } else { echo "The email has failed!"; } ?> -
For one we cant view that URL. Its LAN side only. Not on the web. Im sure the user is going to get pissed if they get a E-Mail everytime they add something to the cart. If they are like, I add and remove items from my cart 8 to 10 times before I check out. (Always finding something better) Point is, thats 8 to 10 e-mails before they checked out. If im not reading what you are asking wrong. You can google for a Email script. <?php $to = "[email protected]"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } ?> Make the $body say anything you want.
-
There has to be a way to do this. Here is my code. Trying to pull the last nine dates then display that infomation in the row without having to write my html as echo. any help or tips? // Connect to server and select databse. mysql_connect("$host", "$dbusername", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $date = date("Y-m-d"); // Make a MySQL Connection $result = mysql_query("SELECT * FROM MEMBERS ORDER BY DATE DESC limit 9") or die(mysql_error()); while($row = mysql_fetch_array($result)) { $showmyphoto = "<center><a href=\"http://www.mytowndate.com/profile.php?id=" . $row['username'] . "\"><img src=\"http://www.mytowndate.com/".$row['photo'] ."\" width=\"90\" height=\"94\"><a>"; ?> <table width="70%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="30%"><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(1)['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(1)['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(1)['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(1)['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(1)['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> <td width="33%"><table width="217" border="0"> <tr> <td width="211"><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(2)['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(2)['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(2)['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(2)['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(2)['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> <td width="37%"><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(3)['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(3)['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(3)['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(3)['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(3)['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> </tr> <tr> <td><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(4)['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(4)['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(4)['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(4)['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(4)['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> <td><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(5)['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(5)['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(5)['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(5)['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(5)['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> <td><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(6)['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(6)['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(6)['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(6)['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(6)['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> </tr> <tr> <td><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(7)['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(7)['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(7)['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(7)['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(7)['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> <td><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row(['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row(['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row(['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row(['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row(['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> <td><table width="220" border="0"> <tr> <td><table width="100%" border="0"> <tr> <td width="47%" rowspan="4" align="left" valign="top" bordercolor="#FF0000" bgcolor="#FFFFFF"><table width="90" height="94" border="1" bordercolor="#FF0000" bgcolor="#FFFFFF"> <tr> <td height="102" bordercolor="#FF0000"><?php echo $showmyphoto; ?> </td> </tr> </table></td> <td height="21" align="left" valign="top"><div align="center"><strong><span class="style16"><?php echo $row['username'] ?></span></div></td> </tr> <tr> <td height="21" align="left" valign="top">Age:<?php echo $row['age'] ?></td> </tr> <tr> <td height="21" align="left" valign="top">City:<?php echo $row['city']; ?></td> </tr> <tr> <td height="26" align="left" valign="top">State:<?php echo $row['state']; ?></td> </tr> <tr> <td colspan="2" align="center" valign="top"><?php echo "<a href=\"http://www.mytowndate.com/profile.php?id=" . $row['username'] . "\">"; ?>VIEW PROFILE</td> </tr> </table></td> </tr> </table> <?php } ?></td> </tr> </table>
-
Using POST not GET
-
Yea, nothing shows up, Lets say i want to search my database and display everyone who has a = a1, b = b1, and c = c1 in other words, every one whos first name is james that are in nc and has the zip code of 29728
-
Hey guys, I been searching all day and found the search code posting here but it dont help me any. Can someone tell me what I am doing wrong here? This is the index.php <form name="form2" action="search.php"> <table width="117%" border="0" align="center"> <tr> <td bgcolor="#3D7AB8">SEARCH</td> </tr> <tr> <td> <input name="a" type="radio" value="1a"> <input name="a" type="radio" value="2a"> <input name="b" type="radio" value="1b"> Male <input name="b" type="radio" value="2b"> Female <br> <input name="c" type="text" id="c" size="6"> <input type="submit" name="Submit2" value="Submit"></td> </tr> </table> </form> This is the search.php <?php ini_set("session.cookie_domain"," .thesolarapexs.com"); session_start(); $username = $_SESSION['username']; $mypassword = $_SESSION['password']; $a1=$_POST['a']; $b1=$_POST['s']; $c1=$_POST['c']; // Make a MySQL Connection $result = mysql_query("SELECT * FROM members WHERE 'a' LIKE '%a1%' AND 'b' LIKE '%b1%' AND 'c' LIKE '%c1%'") or die(mysql_error()); ?> <table border="0" align="center"> <tr><td><div align="center"> <?php while($row = mysql_fetch_array($result)) { if($x == 2){ echo '</div></td></tr></table><table border=\"0\" align=\"center\"><tr><td><div align=\"center\">'; $x=0; } else{ $x++; } $showmyphoto = "<center><a href=\"http://date.thesolarapexs.com/profile.php?id=" . $row['username'] . "\"><img src=\"http://date.thesolarapexs.com/".$row['photo'] ."\" width=\"132\" height=\"158\"><a>"; echo $showmyphoto; echo "<br>"; echo "Username: " . $row['username'] . "<br>" . "Age: " . $row['age'] . "<br>" . "City: " . $row['city'] . "<br>" . "State: " . $row['state'] . "<br>" . "<span class=\"style3\">ONLINE TODAY!</span></center>"; echo "</div></td><td><div align=\"center\">"; } ?> Any help?