Hello, I am having problems with my code. Its supose to on the first page display the query, Then once its displayed it has a link on the Name that was pulled from the database linking to the next page thats supose
to pull the info from what I clicked on on the first page. The code bellow is set to only display the name on the second page, because once thats working i can fill the rest in. Right now it only displays the info on the first page. The linked name takes it to the next page but doesnt display any info. Hope this helps:
First page:
1, John Hancock 2010:11:10 12:30:00 131-555-2121
Second Page:
Name: John Hancock
Address: 1212 main st
City: Hank State: DC
connect.php just has the database info.
First Page: Index.php
[php] ?php
// session_start();
$_SESSION[‘id’] = $_POST;
//echo $_SESSION[‘id’];
$_POST[‘id’];
$customerid = trim(stripslashes($_POST[‘customerid’]));
//$id = $_POST[‘id’];
//session_start();
//echo "Your logged in as ".$_SESSION[‘user’];
include ‘connect.php’;
$query=“SELECT * FROM worksheets WHERE status
= ‘1’ AND priority
!= 1”;
// $query=“SELECT * FROM worksheets”;
$result=mysql_query($query);
$num=mysql_numrows($result);
print ‘
In Shop: $num | ’; $id=mysql_result($result,$i,“id”); $name=mysql_result($result,$i,“name”); $date=mysql_result($result,$i,“date”); $time=mysql_result($result,$i,“time”); $phone=mysql_result($result,$i,“phone”); $page= “results.php”; echo “$id, $name, $date, $time, $phone ”; } $worksheetnum = trim(stripslashes($_POST[‘worksheetnum’])); $customerid = trim(stripslashes($_POST[‘customerid’])); $id = $_POST[‘wo’]; print $worksheetnum; ?> [/php] Second Page: results.php
$result=mysql_query($query); $n=0; //Get Customer Data from datebase from $customerid $n=0; |