Set Categories


Posted on 16th Feb 2014 07:03 pm by admin

I am creating a submission form for somebody to come in and submit products. These products are separated by brand. How can I get them to display according to the brand?

Here is the form code:

Code: <?

include("../include/session.php");

?>


<?php


if ($submit) {


$sql = "UPDATE productimages SET
title='".$_POST['title']."',
upjpg='".$_POST['upjpg']."',
uptiff='".$_POST['uptiff']."',
uppng='".$_POST['uppng']."',
chungshi='".$_POST['chungshi']."',
stretchwalker='".$_POST['stretch_walker']."',
akaishi='".$_POST['akaishi']."',
bellamargiano='".$_POST['bellamargiano']."',
mbt='".$_POST['mbt']."',
upthumb='".$_POST['upthumb']."'
where id ='".mysql_real_escape_string($_POST['id'])."'";

$result = mysql_query($sql) or die(mysql_error());


print("Product Added");





} else {


$result = mysql_query("SELECT * FROM productimages WHERE id = '$id'");
while ($row=mysql_fetch_array($result)) {
$id = $row[id];
$uptiff = $row[uptiff];
$upjpg = $row[upjpg];
$uppng = $row[uppng];
$chungshi = $row[chungshi];
$stretchwalker = $row[stretchwalker];
$akaishi = $row[akaishi];
$bellamargiano = $row[bellamargiano];
$mbt = $row[mbt];
$upthumb = $row[upthumb];

}

print ("



<form method=post action=productimages.php>
Product Title:

<input type=text name=title size=60>




Choose Categories that this story is relevant to:


<input type=checkbox name=chungshi value=1> Chung Shi

<input type=checkbox name=stretchwalker value=1> Stretchwalker

<input type=checkbox name=akaishi value=1> Akaishi

<input type=checkbox name=bellamargiano value=1> Bellamargiano

<input type=checkbox name=mbt value=1> MBT




<table width=500 cellpadding=0 cellspacing=0>



<tr><td colspan=2 class=top><strong>Images</strong></td></tr>

<tr><td>Upload JPG</td><td>
<input type=file name=upjpg></td></tr>
<tr><td colspan=2 class=top> </td></tr>
<tr><td>Upload TIFF</td><td>
<input type=file name=uptiff> </td></tr>
<tr><td colspan=2 class=top> </td></tr>
<tr><td>Upload PNG</td><td>
<input type=file name=uppng> </td></tr>
<tr><td colspan=2 class=top> </td></tr>
<tr><td>Upload Thumbnail</td><td>
<input type=file name=upthumb> </td></tr>
</table>




<input type=submit name=submit value=submit>



</form>

");




}

?>

338 Like 49 Dislike
Previous php-forum Next php-forum
Other php-forum

Mail from PHP form not always ending up in my inbox?
Hi guys,

I'm a real newbie to PHP and have managed to put together a simple mail form that se

PHP time (deadline within one week)
I have a column ['projdue'], which stores the deadline for a project.
I have PHP code and <

displaying unknown amount of results
I am reading a directory and getting a list of folders in the directory, I want to display the folde

problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi

PHP MySQL and DATE
Hi everyone

I have a databse and in one of the columns I have date values such as 2009-March-

php is not recognized as an internal or external command
Hello,

I am trying to bake the code in CakePHP through my console.
I have changed my Path

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write

Can't get the unicode character
I'm trying to get some text from various parts of a file. I have converted the file to hex (bin2hex)

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash