...

View Full Version : Passing variables from page1.htm to page1.cgi



moisesbr
11-21-2009, 06:44 PM
Hi

I am trying to pass my variables values from page1.htm to page1.cgi and then to page2.cgi

From page1.htm to page1.cgi there is no problem, because I do as below


$myuser = $field{myuser} ;

The problem happens when I try to pass it from page1.cgi to page2.cgi

I tried to build a form in pag1.cgi using print command, as below


print ' <INPUT type=hidden value='.$myuser.' name=myuser size="100" >';

Supposing my user is jhon francisco , it breaks the string and only jhon is shown

Is there a way to pass variables values from a page1.cgi to page2.cgi without having
to build them as hidden files of a form?

If not, is there a way from preventing them to break ?


Moises

FishMonger
11-21-2009, 07:22 PM
You could use server side sessions but at this point, that would be above your experience level.

You need to put quotes around the $myuser var. Rather than using the concatenation operator, do this:

print "<INPUT type=hidden value='$myuser' name='myuser' size='100' >";

moisesbr
11-21-2009, 09:26 PM
It works fine

Great advice

Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum