I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database assigns an ID number. The front end displays each upload by ID number. I'm trying to set up the back end so that a user can re-order by changing the ID number. I can get it to display the ID number in an editable text area, display thumb and title for each entry. With the code below it doesn't update the database ID number when I save. What am I doing wrong here? (Just to let you know this code is a modified version of my 'delete entry' code that works)
<?php
if($session->logged_in){
mysql_connect("localhost", "yeee", "eeeee") or die(mysql_error()) ;
mysql_select_db("eeeeee") or die(mysql_error()) ;
if(!isset($cmd))
{
$result = mysql_query("select * from test order by id");
while($r=mysql_fetch_array($result))
$title=$r["title"];
$id=$r["id"];
$thumb=$r["thumb"];
echo "<div style='display:block; width:400px; padding-left:25px;padding-right:25px; margin:auto; background-color:#ffffff;'>
<img src='images/menu-top.jpg' style='width:450px;margin-left:-25px;'><br />
<form>
<table>
<tr>
<td><input type='text' name='id' value='$id' size='3'></td><td width='350px'><strong>$title</strong></td>
</tr>
<td colspan='2' align='center'><img src='upload/test/$thumb'></td>
</table></form>";
}
}
?>
<?php
echo "<div style='text-align:center;'><a href='testorder.php?cmd=order&id=$id'>Submit</a></div>";
?>
<?php
if($cmd=="order")
{
$sql = "UPDATE test SET id='$id'";
$result = mysql_query($sql);
echo "UPDATED!";
echo "<a href='main.php'>Click here to return to the Administration Area.</a>";
}
}
else{
echo "[<a href='main.php'>Please Login</a>]";
}
?>
Which PHP-Editor do you think is the best?
Hi everyone, Myself Brian Anderson. For the last 2 years i have been working as a php-professional. I would like to conduct a poll for knowing which PHP-Editor you guys think is the
Error with Font and imagettfbbox
I keep getting an error that says "Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /home/a6079442/public_html/rebuild/includes/csi.php on line 48Error in imagettfbbox
Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is for it to show all the character names that are assigned to each user so yes than can be more than
iMatch stored value with the current value in a loop
Hello,I have a MySQL db were I store articles in.I have a form to fill these articles, and in that form I can select images who are stored into a directory. Selecting the images works good but the
A Few Questions
Hi, I want to ask a few questions that I can't seem to find..1) I'm creating a "shortcut" system on my website, where users can add shortcuts from pages by clicking the link and it will
quick question
Hi ..i have a questionhow do i set a var so it displays via an echoCode: $logo = '<img src="Images/tvguide/sabc1.jpg">';echo '<div
sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields. fields it is inserting into:FirstLastemailpasswordit is saying the record has been added. is there something
Anti Spam Code Problems
Ok where do i start? Probably by telling you I have very little working knowledge of PHP and that I have been working on this problem for 3 days and have had no luck!Here we go:I have a rate and
Simple PHP/Java Help..
Hi,I'm trying to build a little program to do with calculating postage. Unfortunately i haven't got a very good idea of how to use PHP, Java, or any other languages - apart from CSS and HTML -_-. If
Merger of 6 sister companies under one flagship company after go live
Dear Experts,