Jump to content

tosicky

New Members
  • Posts

    3
  • Joined

  • Last visited

tosicky's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. tosicky

    Wamp server

    How do i configure my wampserver so that i can connect to mysql and database
  2. Here is the code. <?php $username="tosicky"; $password="physic"; $db="e-banking"; $host="localhost"; $cid=mysql_connect("localhost","tosicky","physic"); if (!cid){ echo("error:" .mysql_error()."\n");} ?> <? If ($_SERVER['REQUEST_METHOD'] == "POST") { $surname=$_POST['s_name']; $firstname=$_POST['f_name']; $sql="INSERT INTO registration"; $sql= $sql . "(s_name,f_name) VALUES"; $sql=$sql."('$surname','$firstname')"; $result=mysql_db_query($db,"$sql",$cid); if(!$result){ echo("error:" . mysql_error() . "\n$sql\n");} echo("new link added\n");} mysql_close($cid); ?>
  3. I'm having problem connecting to database on wampserver.already i av set the username and password but each time i click on submit button it takes me to a blank page and the details entered on the form are not inserted in database. Any solution please
×
×
  • Create New...