Jump to content

saadshams

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by saadshams

  1. <select name="countryID"> <option value="%">All</option> <option value="1">USA</option> <option value="2">Canada</option> <option value="3">Germany</option> </select> I want the action page to display Either 1) All Cities of All Countries OR 2) Cities of a Specific Country I could tackle the problem by manually handling the code but trying to find a solution through Dreamweaver Server Behaviors (optionally a bit of manual handcoding). Any idea
  2. If i am not wrong you are trying to upload files. If then google "PHP Uploage Files". The strategy is usually to save filename (with path, depends), and a separate code to deal with the upload of the file to a specific folder (note, create this folder yourself on the server, PHP will not create it for you). add this after GetSQLValueString function if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $uploaddir = 'images/'; $uploadfile = $uploaddir . basename($_FILES['image]['name']); move_uploaded_file($_FILES['image]['tmp_name'], $uploadfile); $_POST['image'] = basename($_FILES['image]['name']); //filename of the uploaded file } //the rest is okay $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO products (prodItemNum, productName, price, `description`, inventory, vendorID, categoryID, image, onSale) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
  3. Perhaps few questions from your code will help you to reach to your solution. 1) Why action="updateProducts.php?ProductNo=<?php echo $row_rsSKU['SKU']; ?> has ProductNo=<?php..... has been hardcoded. It will always be the first value passed to updateProducts.php page. Remove this parameter 2) If you are examining values at address bar, note your form action is set to POST. If updateProducts.php is extracting value using GET method, set the method to GET. 3) While populating your select Menu, you have chosen "Select value equal to" and the $row_rsSKU['SKU'], thats why its comparing values <?php if (!(strcmp($row_rsSKU['SKU' .... (remove that).
×
×
  • 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.