gamercross Posted February 15, 2008 Share Posted February 15, 2008 Hi, im looking for a script that i can place a little box on my site, and then through a form on an alternate location, edit what is in the box, if possible using a wysiwyg editor so i can also make images appear in the box etc. I thought this was more html orientated, but may contain an aspect of php. Thanks, Awaiting a Response, Gamercross Link to comment https://forums.phpfreaks.com/topic/91304-editable-field/ Share on other sites More sharing options...
Isityou Posted February 15, 2008 Share Posted February 15, 2008 It also looks like you'll need some Javascript too. Link to comment https://forums.phpfreaks.com/topic/91304-editable-field/#findComment-467924 Share on other sites More sharing options...
gamercross Posted February 15, 2008 Author Share Posted February 15, 2008 Can anyone help me out with this then? Thanks, Gamercross Link to comment https://forums.phpfreaks.com/topic/91304-editable-field/#findComment-468076 Share on other sites More sharing options...
ahzulfi Posted February 24, 2008 Share Posted February 24, 2008 Hello, hope this will helps you - index.php (Where Box Has to be appea) - edit.php (Where You Edit The box) -Create Table iN Database table_name --field1(TEXT) INDEX.PHP - PUT THIS CODE WHERE YOU WANT TO SHOW YOUR BOX <?php //After Connectin to database $query=mysql_query("SELECT * FROM table_name"); $data = mysql_fetch_array($query); echo $data['field1']; ?> EDIT.PHP <?php //After Connection to Database if(isset($_POST['submit'])){ $box = $_POST['text_box']; $query = mysql_query("INSERT INTO table_name(field1)VALUES('".$box."')"); echo "Data Has Been Added"; } $query=mysql_query("SELECT * FROM table_name"); $data = mysql_fetch_array($query); ?> <form name="form1" method="post" action=""> <label> <textarea name="text_box" cols="45" rows="5" id="text_box">echo $data['field1'];</textarea> <br> </label> <label> <input name="submit" type="submit" id="submit" value="Submit"> </label> </form> Link to comment https://forums.phpfreaks.com/topic/91304-editable-field/#findComment-475046 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.