Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Parameter error

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Parameter error

Postby border20 » Tue Apr 01, 2003 7:47 am

I have the folowing code,,,when i press the button, i want the page to reload with a parameter that is the $current variable...

but it doesn't work,,, it reloads without a parameter:


Code: Select all
<form method="POST" action="<?php echo $PHP_SELF?>">

    echo"<a href='".$php_self."?modif=".$current."'><Input type='submit' name = 'add4' value ='Add'></a>";


Can anyone help with this ?
border20
New php-forum User
New php-forum User
 
Posts: 32
Joined: Tue Jan 28, 2003 10:19 am
Location: Québec

Postby Oleg Butuzov » Wed Apr 02, 2003 1:19 am

register globals = on;
or $_SERVER[PHP_SELF]
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Postby pootergeist » Wed Apr 02, 2003 3:10 am

clicking a submit button will submit the form to the designated action - it will not take a bit of notice of the <a tags you have surrounding it.

if you want to posted to page to be php_self."?modif=".$current."' then put that in the form action and not an anchor.
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK


Return to PHP coding => General

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 6 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron