justAnoob
Members-
Posts
561 -
Joined
-
Last visited
Never
Everything posted by justAnoob
-
I placed a hidden field on the form... Created a session variable for $row['id'].....Then called that variable on the update script and everything works great.. Would you do anything different????
-
[SOLVED] Uploading images from a form to a sql database! help
justAnoob replied to xx_princess_xx's topic in PHP Coding Help
You are better off uploading an image path to mysql and uploading the actual image to a directory on your server. -
Well Ken2K7,, you helped me out yesterday with a variable on a script. So now my paginatio setup is done for each user that has more than one picture on their account....So now I'm back to getting this Update button to work....With the pagination setup,, the update button appears for each picture... When I click on the update button, it echos that the item has been updated. But then I refresh my page and nothing has actually been changed.... Here is the form page and the update script.... I got to go outside and cut the grass,,, so I'll be back later... <form id="form2" name="form2" method="post" action="update.php"> <?php session_start(); include "connection.php"; if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } $findit = $_SESSION['id']; $result = mysql_query("SELECT id FROM members WHERE username = '$findit' LIMIT 1"); $e_row = mysql_fetch_assoc($result); $query = mysql_query("SELECT count(*) FROM abcxyz WHERE user_id = " . $e_row['id']) or die(mysql_error()); $query_data = mysql_fetch_row($query); $numrows = $query_data[0]; $rows_per_page = 1; $lastpage = ceil($numrows/$rows_per_page); $pageno = (int)$pageno; $prevpage = $pageno-1; $nextpage = $pageno+1; if ($pageno > $lastpage) { $pageno = $lastpage; } if ($pageno < 1) { $pageno = 1; } $limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page; $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = " . $e_row['id'] . " $limit"); if($lastpage != 0) { echo "<table width='954' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#000000' bgcolor='#BBD4E1'>"; while ($row = mysql_fetch_array($sql)) { echo "<tr><td width='188' height='180'><div align='center'>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath3'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath4'] . '" width="125" alt="" />'; echo "</div></td><td width='190'><div align='center'>"; echo '<img src="' . $row['imgpath5'] . '" width="125" alt="" />'; echo "</div></td></tr><tr><td height='43' colspan='4'>"; echo '<strong>Item Name:</strong> <input type="text" name="item_name" value="' . $row['item_name'] . '" size="50" /> '; if ($pageno == 1) { echo " Previous Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage'> Previous Item </a>"; } echo "($pageno of $lastpage)"; if ( $pageno == $lastpage ) { echo " Next Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage'> Next Item </a>"; } echo "</td><td><div align='center'>"; echo ""; echo "</div></td></tr><tr><td height='116' colspan='4'>"; echo '<strong>Description:</strong> <textarea name="description" cols="75" rows="5">' . $row['description'] . '</textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td height='124' colspan='4'>"; echo '<strong>Seeking:</strong> <textarea name="in_return" cols="75" rows="5">' . $row['in_return'] . ' </textarea>'; echo "</td><td><div align='center'>"; echo '<input type="submit" name="submit" id="submit" value="Update">'; echo "</div></td></tr><tr><td colspan='4'>"; echo ''; echo "</td><td><div align='center'>"; echo ''; echo "</td></tr>"; } echo "</table>"; } else { echo "You currently have no pics."; } ?> </form> <?php error_reporting(E_ALL); ini_set('display_errors',1); session_start(); require 'connection.php'; if(isset($_POST['submit'])) { $item_name = mysql_real_escape_string($_POST['item_name']); $description = mysql_real_escape_string($_POST['description']); $in_return = mysql_real_escape_string($_POST['in_return']); $sql = "UPDATE member_trades SET item_name = '$item_name', description = '$description', in_return = '$in_return' WHERE id = '1'"; //right now just putting in id number until script works,, then I'll put in the variable. if(mysql_query($sql)) { echo $item_name . ' has been updated.'; } else { echo 'There was an error processing the query: ' . mysql_error(); } } ?> Be back in a couple hours...
-
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
Alright,, sounds good... Thanks again for all your help.... You have no idea how much I appreciate it. Talk to you soon. -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
I'll get back to you tomorrow,, thanks again. -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
oopppsss,, thought I did that... Everthing works now.... thanks... shoot me an email if you don't mind...transam_00@sbcglobal.net.....got a few questions for you if you dont' mind. -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
now there is an error on the line you wanted me to change -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
Progress,, I think,,, Now it echos the line that says there are no pics.. But with the username that I am using I know that there are some pics.. Four of them. -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
Read the comment lines <?php session_start(); include "connection.php"; if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } $findit = $_SESSION['id']; $result = mysql_query("SELECT id FROM members WHERE username = '$findit' LIMIT 1"); $result = mysql_fetch_assoc($result); $query = "SELECT count(*) FROM abcxyz WHERE user_id = " . $result['id']; $query_data = mysql_fetch_row($result); ////giving me error on this line mysql_fetch_row(): supplied argument is not a valid MySQL result resource $numrows = $query_data[0]; $rows_per_page = 1; $lastpage = ceil($numrows/$rows_per_page); $pageno = (int)$pageno; $prevpage = $pageno-1; $nextpage = $pageno+1; if ($pageno > $lastpage) { $pageno = $lastpage; } if ($pageno < 1) { $pageno = 1; } $limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page; $result = mysql_query("SELECT id FROM members WHERE username = '$findit'"); $result = mysql_result($result, 0, 0); $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = " . $result['id'] . " $limit"); if($lastpage != 0) { echo "<table width='954' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#000000' bgcolor='#BBD4E1'>"; while ($row = mysql_fetch_array($sql)) { echo "<tr><td width='188' height='180'><div align='center'>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath3'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath4'] . '" width="125" alt="" />'; echo "</div></td><td width='190'><div align='center'>"; echo '<img src="' . $row['imgpath5'] . '" width="125" alt="" />'; echo "</div></td></tr><tr><td height='43' colspan='4'>"; echo '<strong>Item Name:</strong> <input type="text" name="item_name" value="' . $row['item_name'] . '" size="50" /> '; if ($pageno == 1) { echo " Previous Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage'> Previous Item </a>"; } echo "($pageno of $lastpage)"; if ( $pageno == $lastpage ) { echo " Next Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage'> Next Item </a>"; } echo "</td><td><div align='center'>"; echo ""; echo "</div></td></tr><tr><td height='116' colspan='4'>"; echo '<strong>Description:</strong> <textarea name="description" cols="75" rows="5">' . $row['description'] . '</textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td height='124' colspan='4'>"; echo '<strong>Seeking:</strong> <textarea name="in_return" cols="75" rows="5">' . $row['in_return'] . ' </textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td colspan='4'>"; echo ''; echo "</td><td><div align='center'>"; echo "</td></tr>"; } echo "</table>"; } else { echo "You currently have no pics."; ///also it echos this line } ?> -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
Well,,, again, I am so confused.... After we fix this,, I won't bother you for a long long time.. lol.. This is what I have right now... <?php session_start(); include "connection.php"; if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } $findit = $_SESSION['id']; $result = mysql_query("SELECT id FROM members WHERE username = '$findit' LIMIT 1"); $result = mysql_fetch_assoc($result); $query = "SELECT count(*) FROM abcxyz WHERE user_id = " . $result['id']; $query_data = mysql_fetch_row($result); $numrows = $query_data[0]; $rows_per_page = 1; $lastpage = ceil($numrows/$rows_per_page); $pageno = (int)$pageno; $prevpage = $pageno-1; $nextpage = $pageno+1; if ($pageno > $lastpage) { $pageno = $lastpage; } if ($pageno < 1) { $pageno = 1; } $limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page; $result = mysql_query("SELECT id FROM members WHERE username = '$findit'"); $result = mysql_result($result, 0, 0); $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = " . $result['id'] . " $limit"); if($lastpage != 0) { echo "<table width='954' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#000000' bgcolor='#BBD4E1'>"; while ($row = mysql_fetch_array($sql)) { echo "<tr><td width='188' height='180'><div align='center'>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath3'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath4'] . '" width="125" alt="" />'; echo "</div></td><td width='190'><div align='center'>"; echo '<img src="' . $row['imgpath5'] . '" width="125" alt="" />'; echo "</div></td></tr><tr><td height='43' colspan='4'>"; echo '<strong>Item Name:</strong> <input type="text" name="item_name" value="' . $row['item_name'] . '" size="50" /> '; if ($pageno == 1) { echo " Previous Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage'> Previous Item </a>"; } echo "($pageno of $lastpage)"; if ( $pageno == $lastpage ) { echo " Next Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage'> Next Item </a>"; } echo "</td><td><div align='center'>"; echo ""; echo "</div></td></tr><tr><td height='116' colspan='4'>"; echo '<strong>Description:</strong> <textarea name="description" cols="75" rows="5">' . $row['description'] . '</textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td height='124' colspan='4'>"; echo '<strong>Seeking:</strong> <textarea name="in_return" cols="75" rows="5">' . $row['in_return'] . ' </textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td colspan='4'>"; echo ''; echo "</td><td><div align='center'>"; echo "</td></tr>"; } echo "</table>"; } else { echo "You currently have no pics."; } ?> -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
2. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 <?php session_start(); include "connection.php"; if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } $findit = $_SESSION['id']; $e_result = mysql_query("SELECT id FROM members WHERE username = '$findit'") or die('1. ' . mysql_error()); $query = "SELECT count(*) FROM abcxyz WHERE user_id = " . $e_result['id']; $result = mysql_query($query) or die('2. ' . mysql_error()); $query_data = mysql_fetch_row($e_result); $numrows = $query_data[0]; $rows_per_page = 1; $lastpage = ceil($numrows/$rows_per_page); $pageno = (int)$pageno; $prevpage = $pageno-1; $nextpage = $pageno+1; if ($pageno > $lastpage) { $pageno = $lastpage; } if ($pageno < 1) { $pageno = 1; } $limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page; $result = mysql_query("SELECT id FROM members WHERE username = '$findit'"); $result = mysql_result($result, 0, 0); $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = " . $e_result['id'] . " $limit"); if($lastpage != 0) { echo "<table width='954' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#000000' bgcolor='#BBD4E1'>"; while ($row = mysql_fetch_array($sql)) { echo "<tr><td width='188' height='180'><div align='center'>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath3'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath4'] . '" width="125" alt="" />'; echo "</div></td><td width='190'><div align='center'>"; echo '<img src="' . $row['imgpath5'] . '" width="125" alt="" />'; echo "</div></td></tr><tr><td height='43' colspan='4'>"; echo '<strong>Item Name:</strong> <input type="text" name="item_name" value="' . $row['item_name'] . '" size="50" /> '; if ($pageno == 1) { echo " Previous Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage'> Previous Item </a>"; } echo "($pageno of $lastpage)"; if ( $pageno == $lastpage ) { echo " Next Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage'> Next Item </a>"; } echo "</td><td><div align='center'>"; echo ""; echo "</div></td></tr><tr><td height='116' colspan='4'>"; echo '<strong>Description:</strong> <textarea name="description" cols="75" rows="5">' . $row['description'] . '</textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td height='124' colspan='4'>"; echo '<strong>Seeking:</strong> <textarea name="in_return" cols="75" rows="5">' . $row['in_return'] . ' </textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td colspan='4'>"; echo ''; echo "</td><td><div align='center'>"; echo "</td></tr>"; } echo "</table>"; } else { echo "You currently have no pics."; } ?> -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 -
$_POST['name'] = "John"; I was hoping to be the first to respond to this.. I wish I could help more people out.
-
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
$findit is getting the id number of the username that is signed in at the time which id is an int. -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
Still get same error,, that is what I tried.... The brain is starting to hurt now.. lol -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
crap,,, no matter what I do,,, still get the same error. -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
So renaming $result wouldn't be a fix then,, eh??? I'll try something. -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
<?php session_start(); include "connection.php"; if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } $findit = $_SESSION['id']; $result = mysql_query("SELECT id FROM members WHERE username = '$findit'"); $query = "SELECT count(*) FROM abcxyz WHERE user_id = " . $result['id']; $result = mysql_query($query); $query_data = mysql_fetch_row($result); $numrows = $query_data[0]; $rows_per_page = 1; $lastpage = ceil($numrows/$rows_per_page); $pageno = (int)$pageno; $prevpage = $pageno-1; $nextpage = $pageno+1; if ($pageno > $lastpage) { $pageno = $lastpage; } if ($pageno < 1) { $pageno = 1; } $limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page; $result = mysql_query("SELECT id FROM members WHERE username = '$findit'"); $result = mysql_result($result, 0, 0); $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = " . $result['id'] . " $limit"); if($lastpage != 0) { echo "<table width='954' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#000000' bgcolor='#BBD4E1'>"; while ($row = mysql_fetch_array($sql)) { echo "<tr><td width='188' height='180'><div align='center'>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath3'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath4'] . '" width="125" alt="" />'; echo "</div></td><td width='190'><div align='center'>"; echo '<img src="' . $row['imgpath5'] . '" width="125" alt="" />'; echo "</div></td></tr><tr><td height='43' colspan='4'>"; echo '<strong>Item Name:</strong> <input type="text" name="item_name" value="' . $row['item_name'] . '" size="50" /> '; if ($pageno == 1) { echo " Previous Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage'> Previous Item </a>"; } echo "($pageno of $lastpage)"; if ( $pageno == $lastpage ) { echo " Next Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage'> Next Item </a>"; } echo "</td><td><div align='center'>"; echo ""; echo "</div></td></tr><tr><td height='116' colspan='4'>"; echo '<strong>Description:</strong> <textarea name="description" cols="75" rows="5">' . $row['description'] . '</textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td height='124' colspan='4'>"; echo '<strong>Seeking:</strong> <textarea name="in_return" cols="75" rows="5">' . $row['in_return'] . ' </textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td colspan='4'>"; echo ''; echo "</td><td><div align='center'>"; echo "</td></tr>"; } echo "</table>"; } else { echo "You currently have no trades."; } ?> -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
Well,, i fixed both lines,,, but now I get this..... Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource I hate to keep bothering you,, but you have been so much help.....I'm not that good at debuggin -
[SOLVED] need help to get variable for a script....
justAnoob replied to justAnoob's topic in PHP Coding Help
What about this line??? Same thing <?php $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = '1' $limit"); ?> Like this??? <?php $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = ' . $result['id']' $limit"); ?> -
I can manually put in a number for the user_id that I want to display the pictures for... But I'm having trouble retrieving it so it will work for whatever user is signed in...... <?php session_start(); include "connection.php"; if (isset($_GET['pageno'])) { $pageno = $_GET['pageno']; } else { $pageno = 1; } $findit = $_SESSION['id']; $result = mysql_query("SELECT id FROM members WHERE username = '$findit'"); $query = "SELECT count(*) FROM abcxyz WHERE user_id = '1'"; ////////////////////////////////// $result = mysql_query($query); $query_data = mysql_fetch_row($result); $numrows = $query_data[0]; $rows_per_page = 1; $lastpage = ceil($numrows/$rows_per_page); $pageno = (int)$pageno; $prevpage = $pageno-1; $nextpage = $pageno+1; if ($pageno > $lastpage) { $pageno = $lastpage; } if ($pageno < 1) { $pageno = 1; } $limit = 'LIMIT ' .($pageno - 1) * $rows_per_page .',' .$rows_per_page; $result = mysql_query("SELECT id FROM members WHERE username = '$findit'"); $result = mysql_result($result, 0, 0); $sql = mysql_query("SELECT id, imgpath, imgpath2, imgpath3, imgpath4, imgpath5, item_name, description, in_return FROM abcxyz WHERE user_id = '1' $limit"); /////////////// if($lastpage != 0) { echo "<table width='954' border='0' align='center' cellpadding='0' cellspacing='0' bordercolor='#000000' bgcolor='#BBD4E1'>"; while ($row = mysql_fetch_array($sql)) { echo "<tr><td width='188' height='180'><div align='center'>"; echo '<img src="' . $row['imgpath'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath2'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath3'] . '" width="125" alt="" />'; echo "</div></td><td width='188'><div align='center'>"; echo '<img src="' . $row['imgpath4'] . '" width="125" alt="" />'; echo "</div></td><td width='190'><div align='center'>"; echo '<img src="' . $row['imgpath5'] . '" width="125" alt="" />'; echo "</div></td></tr><tr><td height='43' colspan='4'>"; echo '<strong>Item Name:</strong> <input type="text" name="item_name" value="' . $row['item_name'] . '" size="50" /> '; if ($pageno == 1) { echo " Previous Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$prevpage'> Previous Item </a>"; } echo "($pageno of $lastpage)"; if ( $pageno == $lastpage ) { echo " Next Item "; } else { echo "<a href='{$_SERVER['PHP_SELF']}?pageno=$nextpage'> Next Item </a>"; } echo "</td><td><div align='center'>"; echo ""; echo "</div></td></tr><tr><td height='116' colspan='4'>"; echo '<strong>Description:</strong> <textarea name="description" cols="75" rows="5">' . $row['description'] . '</textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td height='124' colspan='4'>"; echo '<strong>Seeking:</strong> <textarea name="in_return" cols="75" rows="5">' . $row['in_return'] . ' </textarea>'; echo "</td><td><div align='center'>"; echo "</div></td></tr><tr><td colspan='4'>"; echo ''; echo "</td><td><div align='center'>"; echo "</td></tr>"; } echo "</table>"; } else { echo "You currently have no pics."; } ?> My tables are setup the following..... members id username abcxyz id user_id item_name description in_return I only showed what is important in the tables for what I am trying to accomplish
-
I will be back tomorrow guys,,,, I'm getting tired... Thanks for all the help though... I'll start again tomorrow... I just hope everthing we did will still help in the long run....
-
But only 1 item will be in front of the user at a time to be able to update,,, and if you are updating an item by selecting the items id,, it should only edit that specific item.......yes there is a while loop there and all the items will be displayed on the page,,, but I'm taking this one step at a time,,,after we can get this to work,,, I will setup a next and previous button so only 1 item is viewable to edit at a time.
-
I don't understand what your saying,,, please don't get mad(lol)
-
Wouldn't this be the way to go.... <?php $sql = "UPDATE abcxyz SET item_name = '$item_name', description = '$description', in_return = '$in_return' WHERE id = '$findid'"; ?> And then do a query for $findid