₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,395 members, 8,426,309 topics. Date: Sunday, 14 June 2026 at 04:24 AM

Toggle theme

Please I Need A Code Snippet To Submit The Details Retrieved From The Form Belo - Webmasters - Nairaland

Nairaland ForumScience/TechnologyWebmastersPlease I Need A Code Snippet To Submit The Details Retrieved From The Form Belo (980 Views)

1 Reply

Please I Need A Code Snippet To Submit The Details Retrieved From The Form Belo by Danyl(op): 3:22am On Jul 24, 2011
good day house i want to set up a php script to submit the following into my mysql database and i want some one to give me a php script that can do the work perfectly.
here is the form html.
<p>Surname:</p>
<form id="form1" name="form1" method="post" action="">
<input type="text" name="textfield" />
</form>
<p>First Name:</p>
<form id="form2" name="form2" method="post" action="">
<input type="text" name="textfield2" />
</form>
<p>Email Address:</p>
<form id="form3" name="form3" method="post" action="">
<input type="text" name="textfield3" />
</form>
<p>Comments:</p>
<form id="form4" name="form4" method="post" action="">
<textarea name="textarea"></textarea>
</form>
<p>How Did You Hear About Us:</p>
<form id="form5" name="form5" method="post" action="">
<select name="select">
<option>Naira land</option>
<option>twitter</option>
<option>facebook</option>
<option>websites</option>
<option>friends</option>
<option>Google Search</option>
</select>
</form>
<p>How Best Can We Contact You:</p>
<form id="form6" name="form6" method="post" action="">
<select name="select2">
<option>Phone</option>
<option>fax</option>
<option>Email</option>
</select>
</form>
<form id="form7" name="form7" method="post" action="Submit.php">
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
<p>
</form>
<form id="form7" name="form7" method="post" action="/home.html">
<input type="submit" name="Submit2" value="Go Back Home" />
</p>
</form>
<p>&nbsp;
</body>
</html>
Re: Please I Need A Code Snippet To Submit The Details Retrieved From The Form Belo by binkabir(m): 12:39pm On Jul 25, 2011
these chunk of code is not d best ways to look for help.

but in brief these is what to do. and mind you, your form looks wrong all the input element of the DOM should be inside just one form.

in the form
<form action="Bleep.php" method="post" name='registration-form'>
,
, //all input element should be placed here
,
<input type='submit' value="submit form"/>
</form>
the Bleep.php is the php script file to call when the submit button is pressed.

inside the Bleep.php file


if(isset($_POST['registration-form']  &&  !empty($_POST['registration-form'])){

  //maybe u will need to validate the input using some functions or classes first e.g email, password strength
  // secondly send to the database




}

i hope these makes sense wink wink wink
1 Reply

Google Adsense Sent Me A Code, What Next?Faceboook Is Hacked And Password Could Be Retrieved.Please I Need A Code To Be Able To Give My Site Members A Referal Link234

Am In Need Of Someone To Teach Me Web Designing On A One On One TrainingPage Impressions Are More Important Than HitsWebsite Designer In Ibadan Needed!!!