Request
Posted: Wed Oct 26, 2005 4:09 am
Jcart | Please use
Any help would be great.
Thanks
BigDave
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
Hello all...
I have a HTML page that sends some data to a PHP page via a form. Send method is GET.
I have tried all the combinations known to man to get the data to print to screen in the PHP page, ie $_REQUEST, $_GET and changed the HTML so it posts the data and tried $_POST in the PHP page.
All I am trying to do is get it to write the sent data to screen but it's proving very difficult. Can someone please help.
The HTML page can be found at [url]http://www.candoslimming.com/members.html[/url] and the PHP is below:Code: Select all
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive">
<title>Check Database</title>
</head>
<body bgcolor="#ffffff">
<?PHP
echo "test"
?>
<br><br><br>
<?PHP
// Connecting, selecting database
$link = mysql_connect(':/var/lib/mysql/mysql.sock', 'root', 'abc123')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully<br><br>';
mysql_select_db('login')
or die('Could not select database<br><br>');
echo 'Connected to LOGIN database<br><br>';
// Performing SQL query
$pinID = $_REQUEST['thepin'];
echo "'$pinID'";
//echo $pinID;
$query = "select * from `keys`";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
</body>
</html>Thanks
BigDave
Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]