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: <?




if ($submit) {

$sql = "UPDATE productimages SET
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>

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





No comments posted yet

Your Answer:

Login to answer
338 Like 49 Dislike
Previous forums Next forums
Other forums

switch form actions? not working
i want on submit to go to different pages according to the CatID

Code: <?php $CatID=$_

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

Transform value 0 in no and 1 in yes help needed
I have this in the table: "value" type int 0 to represent false and 1 to represe

The repetition structure: the while statement not working
New programming student, have assignment as follows:
A restaurant has 4 lunch combos for custom

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