dynamic site updater
Posted: Sun May 22, 2005 12:02 am
Currently I am working on a site wherre I am making a php script that will allow me to change the text on pages without having to open code files. But I am stuck somewhere.
I am making a form that will allow the client to select the page and then change the text. This what I have right now
what I want the text area to do is as soon as a page is choosed in the menu it would what currently exist in the record for text for that php in the database.
I am making a form that will allow the client to select the page and then change the text. This what I have right now
Code: Select all
<form name="form1" method="post" action="3">
<p>
<select name="select">
<?php require_once('php/connect.php');
$query = "select * from data ";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
for ($i=0; $i + 1 <= $num_results; $i++)
{
$row = mysql_fetch_array($result);
echo "<option>";
echo $row['page'];
echo "</option>";
} ?>
</select>
<div id="f.htm#3"><textarea name="textarea" cols="45" rows="10></textarea></div>
<input type="submit" name="Submit" value="Submit">
</form>