help

Reply

Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

help

 
0
  #1
Feb 18th, 2008
hi in this app i have three pages
from the first page id is passed to the second page.in the third page i am not able to get the value..............
if (mysql_num_rows($result) > 0 )
{
while($row = mysql_fetch_row($result))
{
  echo "<tr>";
 echo "<td><a href='detailjob.php?id=".$row[3]."'>".$row[0]."</td><td>".$row[1]."</td>";
echo "</tr>";
echo "<tr><td bgcolor='#008080'></td><td bgcolor='#008080'></td></tr>";
  }
echo "</table>";
}


$line=$_GET['id'];
echo $line;
$result=mysql_query("SELECT * FROM post_resume where id='$line'");
for ($i = 0; $i < 1; ++$i)
{
$line = mysql_fetch_row($result);
$rid=$line[0];
echo "<table width='60%'>";
print "<tr><td><font face='Times New Roman' color='#008080' size='3'><strong>Resume Title</strong></font></td></tr>";
print "<tr><td> $line[2] </td></tr>";
print "</table>";


<form method="post" action="agreement1.php">
<?php
echo "thanks for creating aggreement with CG";
echo $_GET['rid'];
$line=$_GET['rid'];
echo $line;
?>
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: help

 
0
  #2
Feb 18th, 2008
and where are you passing id in page 2 ?
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

Re: help

 
0
  #3
Feb 18th, 2008
$line=$_GET['id'];i am getting 2nd page is working.....i am able to fetch data from the db.third is not working
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: help

 
0
  #4
Feb 18th, 2008
Thats in page 2. You are passing it href='detailjob.php?id=".$row[3]. , so you are getting. My question is, where are you passing $line from page2 to page3 ? Can you post page2 and page3's code using [code] tags ?
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

Re: help

 
0
  #5
Feb 18th, 2008
sorry.............
page1
if (mysql_num_rows($result) > 0 )
{
while($row = mysql_fetch_row($result))
{
echo "<tr>";
echo "<td><a href='detailjob.php?id=".$row[3]."'>".$row[0]."</td><td>".$row[1]."</td>";
echo "</tr>";
echo "<tr><td bgcolor='#008080'></td><td bgcolor='#008080'></td></tr>";
}
echo "</table>";
}

page2

$line=$_GET['id'];
echo $line;
$result=mysql_query("SELECT * FROM post_resume where id='$line'");
for ($i = 0; $i < 1; ++$i)
{
$line = mysql_fetch_row($result);
$rid=$line[0];
echo "<table width='60%'>";
print "<tr><td><font face='Times New Roman' color='#008080' size='3'><strong>Resume Title</strong></font></td></tr>";
print "<tr><td> $line[2] </td></tr>";
print "</table>";

page3

<form method="post" action="agreement1.php">
<?php
echo "thanks for creating aggreement with CG";
echo $_GET['rid'];
$line=$_GET['rid'];
echo $line;
?>
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: help

 
0
  #6
Feb 18th, 2008
$rid=$line[0];
You are just assigning the value to $rid. You can pass the value from one page to another in 3 ways.
1. pass it in the query string ($_GET method).
2. use a session variable to pass the values.
3. Post it through the form. ($_POST).

In page 1, you are passing the id in query string. In page 2, you aren't doing passing the value ot $rid to page 3.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

Re: help

 
0
  #7
Feb 18th, 2008
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/careergl/public_html/detailresume.php:2) in /home/careergl/public_html/detailresume.php on line 3

wats this error mean
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: help

 
0
  #8
Feb 18th, 2008
That means you have an echo statement or a html tag before session_start().
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

Re: help

 
0
  #9
Feb 18th, 2008
thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC