473,372 Members | 1,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Submit form X times

Hey everyone , i am trying to submit a form 4 times with diffrent inputs.

i have 2 files

main.php
Expand|Select|Wrap|Line Numbers
  1. $p = 1
  2. while ($p < 5 ){
  3. file_get_contents("submit.php?p=" . $p);
  4. echo "Submited form  " . $p . "<br />";
  5. $p++; 
  6. }
and submit.php
Expand|Select|Wrap|Line Numbers
  1. $c = $_GET[p];
  2.  
  3. echo "
  4. <form name='register' action='http://...form.php' method='post'>
  5. <input id='n' type='text' name='name' value='" . $c . "' />
  6. <input id='e' type='text' name='email' value='" . $c . "@email.com' />
  7. <input id='s' type='submit' value='Register' />
  8. </form>
  9. <body onload=s.click()>";
i didnt worry about checking if $_GET[p] was set because this is only an experiment.
this method should submit to the external 'form.php' 4 times with a diffrent name and email each time.

this however isnt working programaticly , when i go to the url manually it works. I believe it hase somethign to do with the s.click() dom i used.

all input is appreaciated , thankyou
Mar 18 '09 #1
0 1071

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Frank Way | last post by:
Hi all, I've googled this one to death, and still can't find an answer. Not sure I'm asking the right question, but here goes: Have a form with an onSubmit that has some javscript to disable...
4
by: Peloux | last post by:
Hi, I have written some htc in order to validate data in a form. most of htc are attached on 'onblur' event. Now, we would like to use the Enter Key to sublit form, so we use the following...
8
by: shandain | last post by:
Ok, I have done this a million times, and I can't get this to work... I hope I am just being an idiot and missing something... but I can't see it... so please call me an idiot and tell me what it...
8
by: bettina | last post by:
I want to submit a form but without a submit button. That's to say, I want that by giving a definite code in a field and then press <ENTER> the form will be submitted. For Example <form...
7
by: amerar | last post by:
Hi All, I am really green at Javascript. Someone gave me some code to play with and I'm trying to understand it: <INPUT TYPE=text NAME=subject SIZE=60 MAXLENGTH=60><BR><BR> <input...
1
by: sudhaoncyberworld | last post by:
Hi all I am trying to submit the form and after form.submit line i am trying to open a url using window.open.... I found in some forum it is not possible to reach out the statement after the...
13
by: deko | last post by:
I have a basic feedback form with a submit button. After the "send" button is clicked, I want the user to be redirected to a different page that says "Your message has been sent." How do I do...
14
by: white lightning | last post by:
How to have <select onchange="this.form.submit()"and also a Submit button on one form? I have something like this: <form action="<?php $_SERVER; ?>" method="post"...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.