This is my code
after run, but why is in blank page
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <?php if (isSet($_POST['name'])) { $name=$_POST['name']; } if (isSet($_POST['age'])) { $age=$_POST['age']; } if (isSet($_POST['phone'])) { $phone=$_POST['phone']; } if (isSet($_POST['school'])) { $school=$_POST['school']; } $connection =mysql_connect("localhost", "root", "") or die ("Could not connect to Mysql"); $selection = mysql_select_db('second') or die ("Unable select database"); $sql= mysql_query("INSERT INTO try1, try2 VALUES (name.age),(phone, school)"); ?> <?php $sql = mysql_query("SELECT * FROM try1"); $sql1 = mysql_query("SELECT * FROM try2"); $result = mysql_fetch_array($sql); $result = mysql_fetch_array($sql1); while($result==0) { print $result['$name'].$result['$age'].$result['$phone'].$result['$school'].'<br/>'; } ?> </body> </html>
Comment