goldy30
New Member
- Messages
- 60
- Reaction score
- 0
- Points
- 0
I'm doing my final website for TAFE but I'm very sketchy on my php. We done it for 2 weeks months ago and haven't used it since. Now I need to start working on my site using php but I have no idea!
Anyway, I want to allow my admin to access a 'manage pages' link and see through a form the content that is displayed from the database.
By entering the title of the page through an input they will alter the title of the page in the front end. They would also be able to add or edit the text on the page through a text area.
Once the information is in the database the content should reflect back into the form fields so admin can see what they are editing.
I have a 'pages' table in the database which consists of 4 fields; pages_id, pagename, title and blurb.
I'd assume I'd have to echo back what is in the database on the page where I want the text to appear.
I'm not sure what other info you need but heres the form.
I appreciate any help or direction anyone can give me. Playing with this will also get the PHP wheels in my head cranking again.
Thanks.
Anyway, I want to allow my admin to access a 'manage pages' link and see through a form the content that is displayed from the database.
By entering the title of the page through an input they will alter the title of the page in the front end. They would also be able to add or edit the text on the page through a text area.
Once the information is in the database the content should reflect back into the form fields so admin can see what they are editing.
I have a 'pages' table in the database which consists of 4 fields; pages_id, pagename, title and blurb.
I'd assume I'd have to echo back what is in the database on the page where I want the text to appear.
I'm not sure what other info you need but heres the form.
HTML:
<form action="" method="post" name="">
<table cellpadding="10px" width="400" height="100px" border="0" bordercolor="" cellspacing="0">
<tr>
<td>
Select Page:<br>
<select name="selectpage">
<option value="index">Home</option>
<option value="viewpetition">View Petitions</option>
<option value="startpetition">Start a Petition</option>
<option value="howtopetition">How to write a petition</option>
<option value="resources">Government Resources</option>
<option value="contact">Contact Us</option>
<option value="privacy">Privacy Statement</option>
<option value="about">About Us</option>
<option value="about">New Page</option>
</select>
</td>
</tr>
<tr>
<td>
Title:<br> <input type="text" name="index_title" size="40">
</td>
</tr>
<tr>
<td>
Page Info:<br>
<textarea name="index_content" rows="7" cols="60"></textarea><br>
</td>
</tr>
<tr>
<td>
<input type="image" src="images/save.gif">
</td>
</tr>
</table>
</form>
I appreciate any help or direction anyone can give me. Playing with this will also get the PHP wheels in my head cranking again.
Thanks.