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>
");
}
?>
losing variables between php brackets
Hihave got this code:Code:
Varible in trigger - refering to correct schema
Hello
Save remote XML to local website folder
Hi, I hope you can help me out. I would like to be able to pull an XML file from another site and then store it in a local folder on my site. That way, I would only need to pull the xml file once in
with clause
hi all, i have a big query that usually access the same table more than once. for example, i have something like this
Query output more than expected
$query=mysql_query("SELECT * FROM players, communities, divisions WHERE dob BETWEEN '{$start_date}' AND '{$end_date}' and communities.id=players.community order by communities.community,
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 the same email. I know I need to do an IF statement but I am kinda foggy on how to do the code.What I
Problem with Sending Mail by PHP
hello all, I m new to php, can u plz provide me the code to send mail by php having CAPTCHA code in the form.i m using the following code :career.phpLine number On/Off | Expand/Contract
Print 'a' to 'z' via for loop
A very simple problem..How Can I print a to z NOT a to y ?It is a part of a code where | $alpha= 'a';for($alpha='a';$alpha!='z';$alpha++){echo $alpha.' ';} Output: a b c d e f g h i j k l m n o p q
SAP Treasury - Commodities
We are running SAP ECC 6.0 with Treasury Activated.
returning data from an ssh2_exec()
here's what i got.$conn = ssh2_connect($this->_host); ssh2_auth_password($conn,$this->_user,$this->_pass)or die("Cannot Connect"); //build command line to include