<html>
<form action="lesson1.php" method="get">
<select name="dropdown">
<option value="">default</option>
<option value="11">1- main page</option>
<option value="12">2- misc page</option>
<option value="13">3- photos</option>
</select>
<input type="Submit" value="Take A Look" align="MIDDLE">
</form>
<?php
if($_GET['dropdown']==11)
{
$id=1;
};
if($_GET['dropdown']==12)
{
$id=2;
};
if($_GET['dropdown']==13)
{
$id=3;
};
$db = mysql_connect("x","x", "x");
mysql_select_db("x",$db);
$requete = "SELECT * FROM seb WHERE id=$id";
$result = mysql_query ($requete,$db);
$seb = mysql_fetch_object($result);
mysql_free_result($result);
?>
<form action="lesson1.php" method="post" name="test">
<textarea name="txtArea" cols="50" rows="30">
<?php Print($seb->name); ?>
</textarea>
<input type="submit" name="submit" value="save">
<input type="int" name="pageid">
</form>
<br>
<?php
mysql_query("UPDATE seb SET name='$txtArea' WHERE id=$pageid", $db);
print($txtArea);
?>
</html>
this is how i finally did it.
heres how it works
1- u select what page u wanna see from the drop down menu.
2- after that , the content of the database where the ID is equal to the variable in the drop menu will appear in the textarea.
3- the content of the text area is now editable to whatever u want it.
4- once ur done editing, u put what ID you want the new content to be updated to in the INT box next to the save button
5- click save, and the database is updated.
things im gonna add, say u were to put a number in the INT box but theres no ID number that is the same in the database, then it will insert into and create it <-- ima do that later tonight....
not bad i suppose from someone(me) who dindt know a clue about php 2 days ago