PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi,
I want to create a quantity counter, but it doesn't work,
the error is in header.php line 3 ($res=$_POST['qty']: Undefined index: qty in C:\wampserver32\www\sale\head.php on line 3
anyone can help me ?
index.php
I couldn't remember the name of the file you were requiring, so I just used some dummy text. How do you mean my script is no good? I posted a number of potential errors in the code you had originally posted. Have they all been addressed? What's happening with your script now? What errors are you encountering?
with your method, the error is:
Parse error: syntax error, unexpected '{' in C:\wampserver32\www\sale\header.php on line 3
which mean's : (isset($_POST['qty'])) {
the variable $qty is the client who want to buy the quantity( for each item),
i want to display this quantity,
now, I know I have to use the "public function count()"
I am Learning it,
do you have any idea ?
I'm not sure you'd need count(). That will return the number of elements in an array. You seem to already have handled that when you iterate over $listproduit. Looking at the code, $qty probably contains the correct value and the issue is solely one of display. Does that sound correct?
using submitted form is impossible to realise my program,
I saw a tutorial in "public function count()",
I am Learning it I wish I could arrive
thank you !