|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
SitePoint Guru
![]() ![]() ![]() ![]() ![]() Join Date: Jan 2006
Location: UK (SWANSEA)
Posts: 655
|
listing items and updating mysql
having a few problems trying to get this to work. What im basicly trying to do is list the content of 4 different tables by the user selecting whic one they want to view. then have a link to a page or a script that i can update the info for that item.
iv tryed but keep running into problems! Code:
else if (isset($_GET['edit'])) {
echo"
<form action= method=post enctype=multipart/form-data>
<p>Select the product range you want to edit<br>
<input type=radio name=table value=clarice checked=checked> Clarice Cliff<br />
<input type=radio name=table value=welsh> Welsh Gaudy<br />
<input type=radio name=table value=deco> Deco Antique<br />
<input type=radio name=table value=royal> Royal Doulton<br />
<input type=Submit value=Edit>
";
include ("dbconnect");
$sql="SELECT * FROM" . $_POST['table'];
$result=mysql_query($sql);
echo"
<table width=293 border=1>
<tr>
<td width=171>Product Name</td>
<td width=106>Update</td>
</tr>
<tr>
";
while($rows=mysql_fetch_array($result)){
echo"
<td>$rows['name']</td>
<td><a href=update.php?id= $rows['id']>update</a></td>
</tr>
";
}
echo"
</table>
";
mysql_close();
}
|
|
|
|
|
|
#2 |
|
SitePoint Guru
![]() ![]() ![]() ![]() ![]() Join Date: Jan 2006
Location: UK (SWANSEA)
Posts: 655
|
no one?
|
|
|
|
|
|
#3 |
|
SitePoint Guru
![]() ![]() ![]() ![]() ![]() Join Date: Jan 2006
Location: UK (SWANSEA)
Posts: 655
|
some one please help me out here as im realy stuck where am i going wrong?
|
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 13:19.








Linear Mode
