Hi got a question everyone has anyone done a website outside of - TopicsExpress



          

Hi got a question everyone has anyone done a website outside of uni server with php and mysql? I have my server and everything it works at displaying table but i cant get it to read or write e.g. login, insert etc? what should i do`? I am trying to get it to login to my own local site but not working am i doing anything wrong here $username= $_POST[user]; $password= $_POST[pass]; //defiens the two variables $select1 = SELECT * FROM login WHERE user=$username and pass=$password; // Sql query that is used to instruct the server, $result=mysql_query($select1) or die (Unable to connect);//It eiher selects select1 or die $count=mysql_num_rows($result); // counts the rows in result if($count==1){ //if the count matches with the gievn information session_start(); $_SESSION[user]=$_POST[user]; // start the session header(Location: google);// go to catalouge.php /*echo no failure;*/ }else { echo(Ops something went wrong); //else echo }
Posted on: Sun, 25 May 2014 11:39:42 +0000

Trending Topics



Recently Viewed Topics




© 2015