A
Anonymous
Guest
I am about to pull what little hair I have let trying to figure if this is possible. On my website I have a drop down menu with different tables in the drop down part.
What I am trying to do is have a user choose the table to get info from then in the search box type in keywords of what to search for.
After successfully login in, I am going to call function to choose different operation in mysql ,
but what is wrong?
Parse error: syntax error, unexpected '>' in C:\Apache\Apache2\htdocs\verifypassword.php on line 25
What I am trying to do is have a user choose the table to get info from then in the search box type in keywords of what to search for.
After successfully login in, I am going to call function to choose different operation in mysql ,
but what is wrong?
Parse error: syntax error, unexpected '>' in C:\Apache\Apache2\htdocs\verifypassword.php on line 25
Code:
<?php
$username = $_POST[user];
$password = $_POST[pass];
$ref = $_SERVER['HTTP_REFERER'];
if( ($username=='zhao') && ($password=='zhao') &&($ref == "http://localhost/login.php"))
[color=red] process_form( );[/color]//call function to choose the table to get info from then in the search
//box type in keywords of what to search for.
else
echo " <font size='20' />ACCESS DENIED!</font> ";
[color=red]function process_form( )[/color] {
$conn = mysql_connect('localhost', 'root', '000405');
if(!$conn) {
echo '<p>Unable to connect to the database server at this time.</p>';
exit();
}
mysql_select_db('firstdb',$conn);
//Initialize the table, set amount = 10000
$sql1 = 'CREATE TABLE checking (amount FLOAT(8))';
$sql2 = 'CREATE TABLE saving (amount FLOAT(8))';
echo "Please select a transaction, enter a $ amount and submit:"
<form>//[b][color=red]line[/color] 25[/b]
<select name = "choice">
<option value="dc">Deposit into checking account</option>
<option value="ds">Deposit into saving account</option>
<option value="tc">Transfer into checking account</option>
<option value="ts">Transfer into saving account</option>
<option value="wc">Withdraw into checking account</option>
<option value="ws">Withdraw into saving account</option>
</select>
</form>
}
?>