Jump to content

Recommended Posts


<html>
<head>

</head>
<body>
<br /><br /><br />

<center><h1> Please choose only the available left Tables . Sorry for any inconvenience . </h1></center>


<?php

if(isset($_POST['Submit']))
{
session_start(); 
$_SESSION['table_id']=$_GET['table_id'];

//print_r ($_SESSION['table_id']);
header ('location:special.php');
}

include('conn.php');

$data=mysql_query("SELECT table_id
FROM restab
WHERE NOT
EXISTS (

SELECT table_id
FROM payments
WHERE STATUS='pending' 
AND restab.table_id = payments.table_id
)")
or die(mysql_error());
echo '<center>';
echo '<form method="POST" action="table.php">';
echo '<select name="table_id">';


for($i=0;$i<mysql_num_rows($data);$i++) 
{

$row=mysql_fetch_assoc($data);
echo '<option value="'.$row['table_id'].'">'.$row['table_id'].'</option>';


}

echo '</select>';
echo '<br /><br /><input type="submit" name="Submit" value="GO ==>>"/>';
echo '</form>';
echo '</center>';

?>
</body>
</html>

 

 

retrieve page :

 

<? 
session_start()
?>
<?php $test=$_SESSION['table_id']; echo $test; ?>

 

Change your first script to:

<?php
session_start(); 
?>
<html>
<head>

</head>
<body>
<br /><br /><br />

<center><h1> Please choose only the available left Tables . Sorry for any inconvenience . </h1></center>


<?php

if(isset($_POST['Submit']))
{
$_SESSION['table_id']=$_GET['table_id'];

//print_r ($_SESSION['table_id']);
header ('location:special.php');
}

include('conn.php');

$data=mysql_query("SELECT table_id
FROM restab
WHERE NOT
EXISTS (

SELECT table_id
FROM payments
WHERE STATUS='pending' 
AND restab.table_id = payments.table_id
)")
or die(mysql_error());
echo '<center>';
echo '<form method="POST" action="table.php">';
echo '<select name="table_id">';


for($i=0;$i<mysql_num_rows($data);$i++) 
{

$row=mysql_fetch_assoc($data);
echo '<option value="'.$row['table_id'].'">'.$row['table_id'].'</option>';


}

echo '</select>';
echo '<br /><br /><input type="submit" name="Submit" value="GO ==>>"/>';
echo '</form>';
echo '</center>';

?>
</body>
</html>

I'm honestly surprised you're not getting any errors

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.