Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Problems using $_POST variables
March 7, 2008, 4:56 pm
rate this thread
to using $_POST.
So I find lot's of cases where the writer has used if ($update) .... which
is passed in the url of the page like page.php?update=something.
So I replaced $update with $_POST['update'] in the test and this usually
works, except when printing/echoing into strings.
So a line like
print $update ; if replaced by print $_POST['update'] ; does not work, the
script seems to crash with no output.
If I write
echo $update ; this works.
<?php echo "faq_admin.php?var1=$var1&var2=$var2" ?>
If I change it to
<?php echo "faq_admin.php?var1=$_POST['var1']&var2=$_POST['var2']" ?>
I'm missing something about the $_POST variables. Can someone point ot an
Re: Problems using $_POST variables
<?php echo "faq_admin.php?var1=&var2=" ?>
Though you should probably pass that whole lot through htmlentities() for
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 220.127.116.11-mm-desktop-9mdvsmp, up 37 days, 23:47.]