php code for displaying data from mysql into textbox?
Posted by: cool_KK (60.51.135.---)
Date: February 10, 2006 10:05AM

Is anyone out there know what is the php code for displaying data from mysql into textbox......? I try to do shopping cart sample yet due to i am beginner, i don't quite understand sample of shopping cart available from Internet.

For my shopping cart, my ideas is to create one temporary table database (mysql) and one permanent table database (mysql). Below are the codes:
<title>Untitled Document</title>

<p align="center"><img src="../../../Documents%20and%20Settings/All%20Users/Documents/My%20Pictures/Sample%20Pictures/Winter.jpg" width="478" height="290">
<form name="form1" method="post" action="tempcart.php">
<input name="code" type="text" id="code" value="100000" readonly="true">
<p> price:$
<input name="price" type="text" id="price2" value="100" readonly="true">
<input type="submit" name="Submit" value="Add to Cart">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="bead.html">&nbsp;<strong>Back</strong></a></p>
<p>View Cart</p>
<p align="center">&nbsp;</p>
------------------------------------------------------------------------------/* From fixed textbox value, i save the value to temporary table database after i click the button.




mysql_connect(localhost,$user,$pass) or die("cannot connect to database."winking smiley;
mysql_select_db($db) or die("cannot select database."winking smiley;
$query="INSERT INTO tbltemporder VALUES('$code','$price','1','$Total')";
mysql_query($query) or die("cannot execute query"winking smiley;



-------------------------------------------------------------/* code to save value to temporary mysql.

I want to create php code for display the value of temporary mysql into textbox. where in this textbox, the user can view the value of table before confirming the purchases.

Is anyone can help me?

Options: ReplyQuote
Re: php code for displaying data from mysql into textbox?
Posted by: Robert (
Date: February 10, 2006 10:56AM

I would think you are more likely to get help for this from a php script site.
This site is just about WAMP related problems.

Options: ReplyQuote

Sorry, only registered users may post in this forum.