Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with variables

Status
Not open for further replies.

Elmserv

Programmer
Sep 25, 2004
72
GB
I apologise that this question is a bit basic


// This is part of the form it works OK

code
Global $nJobno = GetJobNo();


?>

<center>

<form action="jobmysqlsend.php" method="post">


/code

I need the variable $nJobno in "jobmysqlsend.php"

code
This is in "jobmysqlsend.php"

print $nJobno;

/code

This results in nothing
 
add to your form...

<input type=hidden name=nJobno value=$nJobno>

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
...and from jobmysqlsend.php,

print $_POST['nJobno'];


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
I have put all that in the form & jobmysqlsend & it prints out $nJobno not the contents of $nJobno

I can see what you are doing by using superglobals why won't it work with globals

Rich
 
Use this instead:
Code:
<input type="hidden" name="nJobno" value="<? echo $nJobno; ?>">

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top