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
Call db table from any PHP file
Hi,
I want to be able to call a database table that will be setup in another file called init
Accessing Infotype data in dialog program
Hi All
In Dialog programs attributes I didn't see any logical database field. How can I access
Not capturing all the information we require in the form.......
Hi Guys,
I was wondering if you would share some more of your knowledge today, I'm hoping it
Mass activity scheduling
Hi experts,
Im facing some problems to deal with mass activity jobs.
When I run some
Interpret Order
Hello all,
I'm wondering if I have this:
Code: $switch = array(
'one' =>
array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h
Need help-Error istream header declaration
Hi Everyone ,
I am having issue with istream declaration. I am new to C programming.
can a
Securing a user input - need some confirmation
Hello All,
I am in the process of recoding a large proportion of an e-commerce site, one of t
Passing an array of values From VB6.0 to Oracle PL/SQL Function
Basically we are using VB6.0.
When we try to pass an array from VB6.0 to an Oracle PL/SQL
convert pps to wsf with php'how?
hi
i want to convert with php
PowerPoint file to swf file(flash)
how please?
thank!!!