Embedding hidden PHP in Static html page
Posted 09 July 2006 - 06:02 AM
I am rolling my own MYSQL shopping cart. One of my requirement is the catalog will be static html files. I have embedded the following into my web page.
<form action="http://www.[my page]addcart.php" method="post" NAME="order" id="order">
Quantity: <input type=text size=2 maxlength=3 name=QUANTITY >
<input type=hidden name="ID_NUM" value="44005">
The way it works is in the form I call SetInputbutton.php with the catalog number. The script queries database to get the quantity in stock. If good it echos the place in cart button, if below a set point it places the number in stock and a place in cart button and if zero, echo only out of stock preventign purchase. The script works but When I view HTML source; it shows the entire PHP script. The question is how to hide the PHP script for prying eyes.
Posted 09 July 2006 - 06:06 AM
Your example script won't work by the way, you are sending a header after outputting.
Posted 09 July 2006 - 06:10 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users