FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » display two values on page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: display two values on page [message #181137 is a reply to message #181130] Thu, 18 April 2013 13:08 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
In addition to what the others have said:

On 4/18/2013 5:44 AM, newbie php wrote:
<snip>

$p=isset($_POST['price']) ? $_POST['price'] : 0;
$n=isset($_POST['number']) ? $_POST['number'] : 0;


The reason being - your page may be called from pages other than the
form (i.e., someone typing the URL into the browser bar), in which case
$_POST['price'] and $_POST['number'] won't be set. This code will set
0's into $p and $n should the values not be set.

Better yet - don't put things like prices in hidden fields. It would be
very easy for me to create a form on my own machine which sets a price
of 1. You can display the price to the user, but keep critical values
like this on the server.

Remember - NOTHING from the user is ever safe and EVERYTHING needs to be
validated.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Anyone uses vTiger's webservice? I need help with webservice's response
Next Topic: Help with searching arrays of objects
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 08:44:19 GMT 2024

Total time taken to generate the page: 0.03468 seconds