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>
");
}
?>
No comments posted yet
Your Answer:
Login to answer
338
49
Other forums
wav to mp3 + goDaddy
I need to convert wav files to mp3s. From what I have found so far one way to do it is to have my PH
2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.
1) on IE when i hit enter instea
Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders
help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:
Parse error: syntax error
Problem in back link
I have page where i have given javascript back link but when i click on it browser give a message
Limiting uploaded file type
I am working on a simple upload script, and I need it to limit the allowed file type that is uploade
Convert array to string and write to csv file
I am looking to write a MySQL query to a csv file.
At the minute I:
check for the orig
Add code to enable passing of checkbox variable on login
Ok, I have a login page, but want to add a checkbox that when checked and successful login is made i
problem with script manager
Hi iam using Net.2005.I have created ajax enabledwebsite.i have master page in which i have script m
Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with