I'm here all night to try and get this done. I have to fix a form up to take petition title, petition, category, duation, target, short title (for url) and keywords and insert them into a database.
I need the form to validate. No empty fields and the form has to pass to a preview page before its inserted into the database for review. The petition should not submit if the user has not signed up and logged in.
I can show you some of what I have but its the basics as I'm not very well versed on php and need the help urgently.
I would appreciate if you contact me via msn and I can work, chat and upload files as we go. Add me airbrushkits@live.com
Here is a link to the page: http://daniel.classroomonline.info/g...=startpetition
Heres what I have:
My table in the db is like this:HTML Code:<?php mysql_query("INSERT INTO petitons SET petitions_id='',members_id='',short_name='$_POST[short_name]',p_title='$_POST[p_title]',target='$_POST[target]',petition='$_POST[petition]',duration='$_POST[duration]',category='$_POST[category]',keywords='$_POST[keywords]'"); ?> <p> </p> <form method="post" name="form1" action="insertpetition.php"> <b>The petition of citizens and residents of Australia call on the Australian Government to...</b><br> <input type="text" name="p_title" size="60" class="normtext"></p> <p> </p> More details about your petition (1000 characters maximum):<br> <textarea rows="6" cols="60" class="normtext" name="petition"></textarea><p> <p> </p> Select Duration: <select name="duration"> <option value="1month">1 Month</option> <option value="3months">3 Months</option> <option value="6months">6 Months</option> <option value="1year">1 Year</option> </select> <p> </p> Select a short name for your petition (Max 20 characters): <input type="text" name="short_name" class="normtext"><br> <span class="smalltext">This gives your petition an easy web address. e.g. (http://www.govpetitions.com.au/newpark)</span><p> <p> </p> Please select a category for your petition<br> <select class="normtext" name="category"> <OPTION>Select a category</OPTION> <option value="counsel">Counsel</option> <option value="roads">Roads & Traffic</option> <option value="aboriginal">Aboriginal Affairs</option> <option value="health">Health</option> <option value="rural">Rural</option> <option value="residential">Residential</option> <option value="education">Education</option> <option value="law_enforcement">Law Enforcement</option> <option value="correctional">Correctional</option> <option value="development">Development</option> <option value="work_rights">Work Rights</option> <option value="religion">Religion</option> <option value="imigration">Imigration</option> <option value="national">National</option> <option value="state">State</option> <option value="other">Other</option> </select> <p> </p> Please enter keyword which are relevant to what your petition is about:<br> <span class="smalltext">Separate keywords with comma only. E.g. license,driving,disqalified</span><br> <input type="text" name="keywords" size="50"> <br> </br> <center><input type="image" name="submit" src="http://forums.x10hosting.com/images/preview.gif" ></center> </form>
Table name is petitions
Fields:
In that order
- petitions_id
- members_id
- short_name
- p_title
- target
- petition
- duration
- category
- keywords


LinkBack URL
About LinkBacks

Reply With Quote

