sending varibles?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
Skeletor
New php-forum User
New php-forum User
Posts: 147
Joined: Tue Nov 19, 2002 7:47 am
Location: US, Ohio
Contact:

Postby Skeletor » Tue Jul 01, 2003 3:14 am

If you are defining and setting the $nc variable within your script, and want to pass it along when the form is submitted, then pass it as a hidden variable.

print('<input type="hidden" name="nc" value="'.!empty($nc) ? $nc : ''.'">');

This will create a hidden variable named "nc". It will set the value to the value of $nc as long as nc is not empty. If it is empty, it will set the value to blank.

When referring to your variable after submission, unless your global variables are set on then you have to use something like $_POST['nc'] or $_REQUEST['nc']

Return to “PHP coding => General”

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest

cron