Linked Questions
10 questions linked to/from How to get int instead string from form?
3
votes
1
answer
4k
views
Why php gettype function always returns string from a $_POST[$var]? [duplicate]
for example i have the following code
...
0
votes
1
answer
79
views
What does the expressiong "(string)" do in PHP? [duplicate]
While having some older PHP code checked/updated with an online system, the output indicated that I should have (string) in several POST variables, such as:
...
0
votes
1
answer
64
views
PHP differentating '' and 0 [duplicate]
I'm working on a teacher gradebook project, and I'm running into an odd quirk of PHP. How do I tell the difference in '' and 0? I am trying to use operators, but I do not have success. Here is some ...
0
votes
0
answers
27
views
PHP Post param converting to zero when casted to int o intval used [duplicate]
Please see this code in PHP
$ind_ginger = intval($_POST['ind_ginger']) ;
$ind_ginger is always coming up as ...
8
votes
3
answers
5k
views
Can a value from $_POST *not* be a string?
In PHP, can a value from the global $_POST array be something else than an array or a string?
The goal is to not have to check if everything is something else than an array or string in a script. If ...
1
vote
1
answer
519
views
Can a radio input send an integer to Django with POST?
I'd like to give three choices which are represented by words but are going to POST numbers:
...
0
votes
1
answer
640
views
php pagination getting error (Fatal Error:unspported operand types)
I got an Error Fatal error: Unsupported operand types in line12 while doing pagination in my page. Please help me how to solve this
...
0
votes
2
answers
515
views
how to avoid refresh on a dropdown menu
when I use a drop down menu to select a quantity on a e-commerece based cart app, the drop down menu refresh to 1 after making the necesari changes on the variables.
the cart will change the quantity ...
-7
votes
3
answers
581
views
How to calculate using a POST variable?
I need to multiply this POST variable by 12. As an example, if the amount was 10, the result should say:
Amount: 120
Here's my code so far:
...
1
vote
2
answers
97
views
else if returning true when false
Im trying to figure out why my elseif statement is returning the else if $name < 5 true even tho I enter fields greater than 5 , it should be echoing out "Great" if all are false! I set the $name ...