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>
");
}
?>
Get keys and values from an array
Hellow,I have an array $Data with keys and values. With a foreach I can display all the values:foreach($Data as $var){ echo $var;}but I also want to display al the keys... how can i do that?
form class help (oop php5)
Hidy Ho Neighbors,I'm forcing myself to learn oop/classes for php5. It seems like a good idea for repetitious coding such as with forms. I've been through the oop tutorials here and elswhere in
How can i steam a video on my PHP site? (non YouTube)
Basically I have a PHP site and don't want to give page rank to YouTube. I just want to stream a basic video. If you know of any methods, please list file types those methods allow, the more the
Is there a way to override built in php functions without APD?
I am trying to use the rename_function()override_function() options that are built into the APD php extension. But I don't want to rely on that extension being loaded.This is another one of my
Curl timeout breaks script
So im having difficulties with skipping timeout error in curlmy script calls different functions my problem is lets say if in function2 is curl timeout error it wont continue with function3 but kills
Pagination
Okay here is the page in question: http://blenderteachings.000a.biz/tutorials.hamishhill.phpI have the records in a database(tutorial name, username description etc). I am pulling these and displaying
how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service
Adding to the next element in a multidimensional array
Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spot in the field_spaces array. Always adding to the next spot. I'll be calling this in a for loop to
Extracting Long text from message class with parameters
Hi,
How can I Compare two xml documents?
Hi all,