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 Like 49 Dislike
Previous forums Next forums
Other forums

how to get sn motherboard
Hello.
I want to get serial number motherboard, cpu and else hardware.
Can You show me sam

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

modifying query string with no page refresh
Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out

login from external site
Hi my new experience begins, Now what i am trying to do is i make three pages, login.php logout.php

problems with search form numerical "between" sending by php
I am trying to display the results of a search, on a sql database, on a web page. I set up html &quo

Database 'Validation'
Hi everyone,
I'm trying to validate the password entered by the user with the password in the dat

On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p

PHP loop
Okay so I have several "articles" stored in a mysql database and am attempting to echo tho

2 decima places & How to reload my page
Hello There,

How do i put full-stop (.) after second figure from behind? ie if i have 123456

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