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!
I am trying to learn how to use php. I know a lot about HTML, but have only been trying php out for about 6 months now. I have found the hardest thing with PHP is implementing my shopping cart. I am trying to install a php cart and I'm sure that I am making this way harder than it should be. I have so far been able to work with the view cart page and have it working just fine. My products are adding to the cart and appear correctly. My problem lies at checkout. I have a rough draft of my customer info. page and a continue button at the bottom of this page. The continue button is suppose to take my customers to the checkout.php page so they can input their shipping address and pmt. info. When I click on the continue button as it is now it simply does a sort of refresh and erases my input? Can anyone help? Not sure if I need to post my php code here or if it just gets viewed with the view source page. Here's a link to my customer.php page:
If more info. is needed please do let me know. I am really frustrated because I thought this would be simple and it has now taken me more than two wks. to get this cart to work. I just don't know what else to check?
Hmmm...did I do something wrong? I see others are viewing my post but not responding? Just wondering why and if I can do anything to get someone to offer assistance.
arborint wrote:I don't think you asked a question...
Hmmm...not sure if you read my first post?
I am trying to learn how to use php. I know a lot about HTML, but have only been trying php out for about 6 months now. I have found the hardest thing with PHP is implementing my shopping cart. I am trying to install a php cart and I'm sure that I am making this way harder than it should be. I have so far been able to work with the view cart page and have it working just fine. My products are adding to the cart and appear correctly. My problem lies at checkout. I have a rough draft of my customer info. page and a continue button at the bottom of this page. The continue button is suppose to take my customers to the checkout.php page so they can input their shipping address and pmt. info. When I click on the continue button as it is now it simply does a sort of refresh and erases my input? Can anyone help? Not sure if I need to post my php code here or if it just gets viewed with the view source page. Here's a link to my customer.php page:
If more info. is needed please do let me know. I am really frustrated because I thought this would be simple and it has now taken me more than two wks. to get this cart to work. I just don't know what else to check?
When I click the continue button it takes me no where? I can not figure out what is wrong with my PHP code to cause this. If I posted my php code here would that help? Where would the problem lie - what page php code should I look at to figure out why that continue button will not take me to my checkout page?
When I click the continue button it takes me no where? I can not figure out what is wrong with my PHP code to cause this. If I posted my php code here would that help? Where would the problem lie - what page php code should I look at to figure out why that continue button will not take me to my checkout page?
Hopefully that clears things up. Sorry.
Last edited by asuperstar103 on Tue Dec 23, 2008 2:36 pm, edited 1 time in total.
When I click the continue button it takes me no where? I can not figure out what is wrong with my PHP code to cause this. If I posted my php code here would that help? Where would the problem lie - what page php code should I look at to figure out why that continue button will not take me to my checkout page?
I'm guessing its your form, not your PHP, but I can't figure that out since I can't see the form.
You should post your files. Definitely the PHP processing file, and the form.
Not sure what the php processing file is? And thank you Brandon for your help - I only hope you can help me! IF I can just get this one flaw fixed I'll be on my way hopefully.
When you click submit, it will execute the "action" command in the form, which in this case, is the same page you are already on.
A PHP processing file would normally be there. For example, you might have a form on contact-us.php and then submit.php to handle all the data/email functions.
But that is likely your first problem. Clicking submit is only sending you right back to the page you are on.
I think your next step should be to do something with your PHP code so that people can actually read it; line breaks and indentation would be a good start.
jayshields wrote:I think your next step should be to do something with your PHP code so that people can actually read it; line breaks and indentation would be a good start.
Yeah I have did that many times, I will do that again today. Wonder why when I cut and paste that code it does that. I even tried copying with formatting so that maybe it would hold the line breaks, nothing. Thanks.
jayshields wrote:I think your next step should be to do something with your PHP code so that people can actually read it; line breaks and indentation would be a good start.
Yeah I have did that many times, I will do that again today. Wonder why when I cut and paste that code it does that. I even tried copying with formatting so that maybe it would hold the line breaks, nothing. Thanks.
OK so I fixed all of my php code. Any idea why my customer page would be taking me to my error page instead of my checkout page. Or where I should look?