Forum Moderators: coopster
<FORM METHOD=POST ACTION=<?"$PHP_SELF?action=view_product&session_unregister('itemsInMandje')";?>>
<INPUT TYPE='submit' VALUE='Leegmaken'></FORM>
The deal is when I push the Leegmaken button it doesn`t unregister the itemsInMandje variable the name is correct. Does anyone know if it is possible to unregister an session in this way and if it is not how should I do other way?
Maybe this is usefull to know when I is send the form trough to bla.php and in the beginning I set the session_unregister in that page that the session unregister.
Thanks.
<FORM METHOD=POST ACTION=<?'$PHP_SELF?action=view_product&sessie=vol';?>>
<INPUT TYPE='submit' VALUE='Leegmaken'>
And this works well:
<? echo
"<A HREF='$PHP_SELF?action=view_product&
sessie=leeg');\">leeg</A>";
?>
Why does the first code not work and the second works just fine? has anyone have an idea?
Thanks
FORM METHOD=POST ACTION=<? echo '$PHP_SELF?action=view_product&sessie=vol';?>>
<INPUT TYPE='submit' VALUE='Leegmaken'>
And in the first question you cannot call a php function on client side. PHP is a server side language.
best regards
Michal Cibor
Still doesn`t work I even get an error page not found?
I used this:
<FORM METHOD=POST ACTION=<?'$PHP_SELF?action=view_product&pa=0';?>>
<INPUT TYPE='submit' VALUE='Leegmaken'>
before and this one works perfect
I would do:
<FORM METHOD="POST" ACTION="<?php echo $PHP_SELF."?action=view_product&sessie=vol";?>">
<INPUT TYPE='submit' VALUE='Leegmaken'>
BTW why don't you use hidden values?
<FORM METHOD="POST" ACTION="<?php echo $PHP_SELF;?>">
<INPUT TYPE="hidden" NAME="action" value="view_product">
<INPUT TYPE="hidden" NAME="sessie" value="vol">
<INPUT TYPE="submit" VALUE="Leegmaken">
And look what is being written in the source code.
Michal