The first page (page1.php) will be a form that will direct the users to another page (page2.php):
Code: Select all
<form action="page2.php" method="post" name="myForm">
// some code
<input type="submit" value="Submit" onClick="location.href='page2.php'">
<input type="reset" value="Reset">Code: Select all
<?php
require_once("dbtools.inc.php");
// some code
$link = create_connection();
$sql = some command
$result = execute_sql("database", $sql, $link);
if ($result) {
echo ("succesful"); }
mysql_close($link);
?>Code: Select all
<?php
function create_connection()
{
$link = mysql_connect("localhost", "account", "password")
or die("error<br><br>" . mysql_error());
return $link;
}
function execute_sql($database, $sql, $link)
{
$db_selected = mysql_select_db($database, $link)
or die("error<br><br>" . mysql_error($link));
$result = mysql_query($sql, $link);
return $result;
}
?>after I clicked submit in page1.php,
I got a blank page instead of page2.php,
What is the problem?
Thank you very much for all of your help.