Jump to content

Php and javascript

NetifxSixteen
Go to solution Solved by fizzlesticks,

maybe its my browser, do i need extra programs installed for it to read php?

i tried xampp but am getting a fatal error as php loads

You need a webserver that can run PHP, what errors is xampp giving?

By allowing the front-end to pass the calculated totalcost to the back-end unless you recalculate and verify the value you are trusting that whatever was on that form was correct.

 

This means I could easily mock this form up myself and submit it to the back-end or intercept the POST with something like Burp Suite. Now I could order 10x of an item and put the price through as 1.

 

If you calculate the cost on the back-end even if the user submits the form a different way or intercepts the request the cost being calculated is still for the items the data received says the user wants and therefore will always reflect the true cost of the items the back-end received

I see what you mean now. Honestly, it's not easy to understand how OP is doing things with the tiny code snippets.

Link to comment
Share on other sites

Link to post
Share on other sites

My problem was the xampp not working for some reason, wamp did the job.

The whole thingy was for a project anyways not for a real website, i did calculate total cost on the php page based on desicions that were made on the html page(form).

Thank you all for the answers.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×