Jump to content

azizmuda

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

azizmuda's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. this my code....help me please. this index file for insert the data. <code> <?php session_start(); ?> <?php $host = "localhost"; $username = "root"; $password = ""; $database = "upload_image"; $conn = mysql_connect($host, $username, $password) or die ("Could not connect"); $db = mysql_select_db($database, $conn) or die ("Could not select DB"); //query ?> <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Dream in Code toturial</title> <style type="text/css"> label { float:left; text-align:right; margin-right:10px width:100px; color:black; } #submit { float:left; margin-top:5px; position:relativve; left:110px } #error { color:red; font-weight:bold; font-size:16pt; } </style> </head> <body> <div> <?php if(isset($_SESSION['error'])) { echo "<span id=\"error\"></p>".$SESSION['error']."</p></span>"; unset($_SESSION['error']); } ?> <form action="upload.php" method="post" enctype="multipart/form-data"> </p> <label>First Name</label> <input type="text" name="fname"/><br/> <label>Last Name</label> <input type="text" name="lname"/><br/> <label>Upload Image</label> <input type="file" name="image"/><br/> <input type="hidden" name="MAX_FILE_SIZE" value="100000"/> <input type="submit" id="submit" value="Upload"/> </p> </form> </div> </body> </html> </code>
  2. i done try on this tutorial but still not running..why the data not inserting into database... :'(
  3. Hello everyone.i'm beginner in programming.How to make page that user can upload their own image.. my database table:product product_id (PK) product_price product_name product_picture anyone can help me..thank for advance:)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.