Parameter error

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 32
Joined: Tue Jan 28, 2003 10:19 am
Location: Québec

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 ?

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Wed Apr 02, 2003 1:19 am

register globals = on;

New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

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.
avatar image based upon nasas apod (only updates if I post though)

Post Reply