hello everyone,
i was wondering if there is any way i can pass varibles from and back to same PHP by using $PHP_SELF or just by calling the same file on action.
regards
mystic
hello everyone,
i was wondering if there is any way i can pass varibles from and back to same PHP by using $PHP_SELF or just by calling the same file on action.
regards
mystic
Calling the same script in the action of a form and having the variables you need as hidden form elements should do the trick.
hi clad,
thnx, clad for your suggestion can you please give me some code example showing me how do i do it. plz
regards
mystic
This isn't tested, so syntax may need adjusting.
<form action="<?=$PHP_SELF?>" method="post">
<input type="hidden" name="var1" value="<?=$var1?>">
<input type="hidden" name="var2" value="<?=$var2?>">
<input type="submit">
</form>
Just append the $QUERY_STRING onto $PHP_SELF:
<A HREF="<?php print $PHP_SELF.'?'.$QUERY_STRING; ?>">Next Page</A>