Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Submit Page A D Working With $_post Data


I am working with data that I pull from one of tables in my data base and format it into tables for ever entry on my webpage. In each table I place a check box called review (see code below): Code:




View Complete Forum Thread with Replies

Related Forum Messages:
SUBMIT The Data In The Same Entry Page
I have one page, which is for data entery. Another page that run the SQL insert and stores the data in the database.

WORKING:
When the data is entered in data entry page and SUBMIT button is pressed then it takes the user to another page which saves the data in the database and shows the message that the data has been entered successfully.

PROBLEM:

I'd like to do the data saving by the same page upon data entry after pressing SUBMIT. How can I do this job? I would like to have a messagebox saying that the data has been entered, and reappearing the data entry page blank. Code:

View Replies !
Send Data To A New Page From Submit
I just posted a question to the Javascript area, but was advised to check this forum for PHP... I have no clue where to start as I do not know any PHP (I have seen it, but have never programmed with it).

Basically what I want to do is have 3 select lists, where the user selects their birthdate (one select list for day, one for month and one for year), then they click on the submit button,

which needs to take them to the relevant page for their star sign. Below is the javascript post I made that has the javascript code to make a javascript pop-up telling the user whattheir star sign is. Code:

View Replies !
POSTing Data To A Page Without Using A Form Submit.
I'm trying to send data to a remote script (a credit card processing
third party) from my site using POST.

Currently, I'm doing it using the ususal form dynamically built with
my values.

This is less than ideal because I want to perform local processing
(updating order status in the local database) and then to proceed to
the remote script, with resultant values, without relying on the user
pressing a [submit] button. Code:

View Replies !
PDF Submit And $_POST
I've been working on this project for awhile now but still can't get it to work so I'm turning to all of you for some help. I have made a PDF application with a HTTP submit button at the bottom. This submits to a php script that I have on my server. What I want to do is to take the submitted data and save it as an XML file on my server. I have been using the $_POST method to get the data sent to the script but it puts it in an array. I can't figure out from here how to make it into an XML file. Any suggestions?

View Replies !
Using $_POST With Submit Button
I wondered if anyone could further advice? In my script I was trying
allow the user to enter a userid and password, and when the users
clicks the login button. Pass these values passed to a method
login_user, and finally display there record.

I was hoping to display the record on this page. I would appreicate
some advice if my scrips looks corrects? I unsure about the line
if(isset($_POST['login'])){ ....

View Replies !
Using Submit Buttons With $_POST
I wondered if anyone could advise further? In my script I was trying
allow the user to enter a userid and password, and when the users
clicks the login button. Pass these values passed to a method
login_user, and finally display there record.

I was hoping to display the record on this web page. I would appreicate
some advice if my scrips looks correct? I unsure about the line
if(isset($_POST['login'])){?........

View Replies !
Isset($_POST['submit']
I have a form that when submits, writes the data to a text file. This all work properly. However, if the form data is submitted successfully, I would like to display a success message to the user to let him/her know.

I understand that if (isset($_POST['submit'])) {... will only run if the Submit button is clicked. This is where my success message should be written and is where I have it in the code below. I don't understand though why my success message is displaying each time the page loads even though the submit button is not clicked! ....

View Replies !
$_POST With Submit Button
Is there a way to check if a script like this i working:

Quote<form name="" method="POST" action="" enctype="text/plain" id="Form1">
<input type="submit" id="Button1" name="DoCrime" value="Do Crime" style="position:absolute;left:36px;top:56px;width:75px;height:24px;z-index:0">
<? 
if (isset($_POST['DoCrime'])) {
include('UnderBridgeCrimeScript.php');
}
?>

because the script "underbridgecrimescript" works on its own but not when included so im thinking its related to this include. Im unsure where the fault lies in this.

View Replies !
Using Session $_POST On Form Submit
having a little issue with a form submit which im hoping someone has the answer to, anyone who can help me solve this I will give $10 via paypal.

I have been using Session Variables for sometimes in Dreamweaver, I dont really hand code that much to be honest, so thats why i need your help. I have quite a large form which has around 25 textfields, checkboxes and Drop Down fields etc, also mutiple file fields for photos, my current issue is that the user sometimes gets a Timeout when uploading the files, when the user uses the 'Back' button all data is lost.

I know it is possible to store all information into session variables just when the user submits the form. I have looked at examples on this forum and the web but found only snipplets Okay....What I really need !

An Example of a basic session, storing the variables to the Server as soon as User has press Submit on the <FORM>, it wouldn't really matter about IF Statments to check if the session exist's, if you could so an example that would be great.

View Replies !
How This If (isset ($_POST['Submit'])) Works
I followed through a tutorial on form validation, and have tried to make some changes to it, in an effort to make it work on my form. In the process, I have done something to it, as it won't work at all. When I click submit on a blank form, it just redisplays the page, where it suppose to give fields that are not filled out properly in red.

Here is the code, which includes the form, and the functions that I have made (not positive they are proper)..............

View Replies !
FORM SUBMIT PROBLEM - Get The Email To Submit On The Same Page
I would like my form to submit via email on the same page, once the form is submited it will then load the next page yourquote.php

I cant however get the email to submit on the same page, it switches almost striaght away to (yourquote.php) and sends the email from that page, i have a loader gif which is meant to load on the form page when submit is clicked which should disapear when the email is submitted only then should it change page.


View Replies !
$_POST Not Working
I have a script containing this code:

if ( !isset( $_POST["english_id"]))
{ $loc_result = get_my_data();
while ( $my_row = mysql_fetch_array($loc_result) )
{ //displaying
$_POST['english_id'] = $my_row["english_id"];
$_POST['word'] = $my_row["word"];
printf("
<a href="%s?english_id=%s">%s </a>
",
$_SERVER['PHP_SELF'], $_POST['english_id'], $_POST['word']);

}
}
else
{ //editin here
echo "in english id";
}


View Replies !
$_POST Not Working In Mozilla Firefox
<?php 

$boatname = $_POST['boatname'];
$UBN = $_POST['ubn'];
echo $UBN;

works fine in IE7 but in FireFox it doesn't seem to be able to retrieve the "posted" variables and therefore the echo statement doesn't display anything.

Form code :

echo '<input type="hidden" name="ubn" value="'.$UBN.'">';

View Replies !
Multi-file Upload - $_POST Not Working...
I have a multi-file upload form... Please looks at my code below. It's
in an initial stage. I'm trying to display the values of each text box
when I press "upload" but it doesn't seem to work... i don't know
what's the problem.. I'm using PHP5.

<html>
<head>
</head>
<body>
<?php
function ifcond($i) {
if ($i > 9) {
return $i;
}
else {
return &#390;'.$i;
}
} //end function ifcond()
for ($i=1; $i < 11; $i++) {
$image[$i - 1] = $_POST[`echo 'image'.ifcond($i);`];
}
print_r($image);
?>

<form action="<?php echo $_SERVER['../PHP_SELF']; ?>"
method="post">
<?php
for ($i=1; $i < 11; $i++) { ?>
Image<?php echo ifcond($i); ?>:
<input type="file" name="image"<?php echo ifcond($i); ?> /><br /><br
/>
<?php } ?>
<input type="submit" value="Upload" /></p></form>
</form>
</body>
</html>

View Replies !
Multiple Submit Buton Not Working
I have this form wherein the user needs to fill up. The first field on the form is a drop down box (which was dynamically created using select stmt in MySQL). The next field is also a drop down box (the choice of the user on the first drop down box will be the condition on the dynamically created drop down box in the second) and this condition will proceed until the third field in the form before the user can actually add an information in the database.

View Replies !
Multiple Submit Buttons Not Working
I am trying to set up a script where the user is submitted to a different page depending upon button hit. Used code according to previous posts here. Looks right, but not working. User goes to blank page with the url for the php script.

Can you take a look and see what the problem might be. I am a newbie and having trouble figuring out what's wrong. Code:

View Replies !
Bypassing "submit" Or Auto Submit With Forms Data
In a regular HTML screen where you have inputs within a FORM, you usually have a SUBMIT input tag to submit the form data to the action'ed item in the form tag.

In alot of sites, I see that you can enter a field, then to its immediate right, is a GO button to submit the choice. Has anyone had experience with this, and if so, how would you code that in PHP? I have also seen where you can choose something from a dialog box, and as soon as its chosen, the form data is submitted. Is that possible in PHP also?

View Replies !
Form Submit Stops Working When So Many Check Boxes Checked - Why?
A PHP application I built has a section which lists a number of members to a
club whose names each appear with a check box beside them that can be
ticked.

These check boxes are part of a form which amongst other submit buttons has
a one particular submit button that if checked will send the form data
(using GET) to a script that will email all the checked members. Code:

View Replies !
Submit Button - How To Submit One Form And Then The Form Data Goes To Other Sites
I'm trying to find a way how to submit one form and then the form data goes to other sites. Here is an Example below! I got Sites (Main),(A),(B)&(C) I want to fill in the form on site (main) and it sends to sites (A) (B) and (C).

View Replies !
$_POST Behavior From Input=submit Vs Input-type=button
I have been trying to solve an annoying behavior with PHP (I think).
Maybe some of you have encountered the same and have some ideas.

I have an html form and I use an <input type="button"> element with
the onClick event that calls a javascript funtion. Once the script's
content has been processed, I execute the form.submit() directive.

I would like to combine the html form and the PHP script into one, and
use action="<?php echo($PHP_SELF) ?>".

When the html form has <input type="button" name="theButton"
value="thisisthetrigger" onclick="doThis(this.form)">but PHP cannot
'read' the value of $_POST["theButton"] after form.submit().

If I substitute the <input type="button"> for <input type="submit">
then PHP reads the value just fine. Some may argue to just use the
latter option, but that will cost me a trip back to the server to
basically do a lot of validation that can be very easily accomplished
on the client side.

View Replies !
$_POST Data
I'm coding a page with text fields using $_POST data.  I have pageone.php which has the text fields, a submit button, etc. and then I have  pagetwo.php which is my "action" page.  I am attempting to insert the data into my database from pageone's $_POST data, but have run into some problems. 

I have checked the forums here as well as googled my problem, but it seems most people are using MySQL on this site.  I hope I'm not out of line to ask this question and if I am -- I'll understand if this thread is locked/deleted. Code:

View Replies !
Where The _POST Data Came From How To Know?
Howdy folks...new registrant here. I've used PHP casually for a couple years, but not extensively. I'm working on a simple feedback page for a site that sends mail through a form. PHP will be used to send the mail based on data posted to it from the previous page.
The question is can I tell where the _POST data came from somehow? What's to prevent someone from figuring out variable names and POSTing from a page they wrote themselves? I'm hoping there's a way to stop processing if it's not posted from the place I specify.

View Replies !
Trouble With $_POST Data
I am trying to send data from a form and insert it into a MSSQL DB.

When I submit the data I get: Warning: mssql_query()
[function.mssql-query]: message: The name "Todd" is not permitted in
this context. Valid expressions are constants, constant expressions, and
(in some contexts) variables. Column names are not permitted. (severity
15) in "Myfile"

If I don't use the POST data and write the query explicitly, it works.

WinXP SP2
MSSQL Express 2005
IIS 5.1
PHP 5.2.1

It's a basic form:

<body>
<form id="form1" name="form1" method="post" action="flextest.php">
<label>User Name
<input name="username" type="text" id="username" />
</label>
<label>Email Address
<input name="emailaddress" type="text" id="emailaddress" />
</label>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
</body>

And here is the MSSQL insert:

if( $_POST["emailaddress"] AND $_POST["username"])
{
//add the user
$Query = sprintf('INSERT INTO users (username, emailaddress)
VALUES (%s, %s)', $_POST["username"], $_POST["emailaddress"]);

$Result = mssql_query($Query);
}

View Replies !
Register Page Using $_POST
I made a register page but for some reson im getting this error:

Parse error: syntax error, unexpected T_ELSEIF in /home/deathsta/public_html/register.php on line 81

As normally you would think its a simple error like a missing ";" or "}", well its not(i think) here is my code:

View Replies !
Getting Data For Duplicate Keys In $_POST
I'm trying to process a form that I got from a JSP generated page.
Basically, want to take out and process some of the data, and redirect the
rest to a JSP page that will handle the rest. All works well, i traverse
$_POST, writeout hidden input fields and autosubmit the form with a little
javascript, a perfectly acceptable solution for our users.

However, the data the JSP page sends contains one certain input with the
same name a couple of times. Due to complicated reasons, I cannot change
that name into a PHP-style array. PHP, however, throws all the values of
those fields away except for the last one.

Is there any way to retreive data from inputs with duplicate names? I know
that with GET, I could just parse the query string myself, but sadly i need
to use $_POST (the thing I'm processing in PHP is a file upload). I have no
way of changing the input names themselves (and see no alternative other
than pulling a lot of ugly javascript hacks in the JSP page to fake it all).

View Replies !
Use The $_POST Variable To Retrieve Data
If I want to pass a value I read from a file using firstPhpFile.php to something like secondPhpFile.php, how do I store this value so I can use the $_POST variable to retrieve it later? I know how to retrieve values from my HTML code using $_POST by using the HTML element's name but how do I do this if the variable is a PHP variable holding a value I need to pass to a different PHP file?

View Replies !
Preventing The Reprocessing Of $_POST Data
I am creating a messaging system where I add a message to the DB through $_POST data.. I'm wondering how I can prevent the data from being resubmitted if the user refreshes the page?

View Replies !
Using $_POST Data And The Mail() Function
I'm using a form on an administrator's site to send email to a long list of people whose email addresses are obtained from a membership database.  I've written a very simple script, using $_POST data and the mail() function, to send out the message.  The problem I'm having is that when I receive the test email messages, the line breaks entered into the textarea are not showing in the email. Code:

View Replies !
_POST Or _GET After Inserting Data
I have a registration form and after submitting the values using "POST" as the form action:

I am unable to see the data on the next page that is calling the posted values using:
$username = $_POST['username']; Code:

View Replies !
How Do I Pass A Bunch Of Same Data To Using $_POST?
I am sending a bunch of IDs to php using $_POST, what's the best way to do that? There is only one $_POST['id'].

View Replies !
Verify Data From Array On $_POST
I am building a script to manage game servers, as in rcon. Currently i have made login form a drop down box with an array of server IP address, $servers And the form inputs those IP address into the drop down, then the user types in his server PORT and rcon password.

The login verifys this data via the game server through a udp packet. Problam is, i dont want people whos game server ip addys arn't in the array to be able to login. Currently this can be easily done my copying the form to another site and removing the drop down with a text field.

What i want to work out is how i can make the process when the login button is clicked to check and see if the post of $_POST['server_ip'] is in the array of $servers Code:

View Replies !
Losing Parts Of My Data Through Re $_POST
I am trying to create a moderately complex set of consecutive forms in order to provide a quote for customers to a retail business site. Input data from the first form (page1.html) is sent via the POST method to the action=page2.phtml (.phtml according to my server-god: Brian).

All the data is parsed correctly from page1 to page2. Most of the data is used to create further questions before going to the final page (quote.phtml) .

I use this: $heat_system=$_POST["heat_system"]; to retrieve the data on page2 and then the data that needs to be sent again is sent using echo '<input type="hidden" name="heat_system" value=" '.$heat_system.' " />' Again the method is POST and action=quote.phtml.

The problem is when the data string from page1 contains two or more words, only the first word arrives on the last page - quote.phtml. (i.e. $heat_system='No Heat') 'No Heat' arrives fine on page2.phtml but when sent along to quote.phtml $heat_system only receives 'No'.

What happened to the last part of my string and why?

View Replies !
$_POST Form Variable And Use In Same Php Page
Apache/2.0.48 (Win32) PHP/4.3.6

I would like to take a value from a checkbox(checked or unchecked) and
then use that value in a php script All on the same page. So I should
post the form to the same page right?

And then pick that variable up via $_POST or $_REQUEST methods right?
I have tried various approaches to the action= clause of the form but
to no avail. I know how i did it in asp but it doesn't seem to work.

View Replies !
Change The Data In $_POST And $_GET To Use ISO-8859-1
I recently moved my site to a different server which seems to use UTF-8 instead of the normal ISO-8859-1 character encoding. Since my scripts and my data all use the old encoding, I would like to switch the server back to ISO.

I know I can change the default_charset variable in the php.ini, but as far as I know that would only change the character set for output. What I need is a way to change the data in $_POST and $_GET to use ISO-8859-1 as well.

View Replies !
Submit To Same Page.
How can i get the submit buttons on each step to send the page to the action? Also, how can i add proccessors to each step? Like say i have an actuall form in each step, how can i check a few things on the step before going to the next step? Code:

View Replies !
Problem: MSIE6 + $_POST Data. Only On One Client And I Can't Reproduce It!
I am tearing my hair out trying to reproduce a problem. The one client
user who has this problem is running IE6 on WinXP Pro.

I tried reproducing the problem in Opera, Mozilla, IE5 on Win2k, IE6 on
Win2k, but no luck.

Here is the problem:

Occasionally, either SESSION data or HTTP POST data is lost. Poof! It
just disappears, with the exception of the PHPSESSID, which leads me to
think it is NOT a session problem.

Unfortunately, I cannot reproduce the problem, so am at a loss on what
details to give that would help. My only hope is that someone else,
somewhere, has experienced a similar symptom, and solved it!

Here is as much relevant data as I can think of:

* I am using Editize, and integrated WYSIWYG HTML editor in place of a
textarea.
* I am using sessions.
* Server is PHP Version 4.3.3, Apache 1.3.27, Red Hat 9
* The symptom occurs when the user goes to an update form (HTML form),
fills in the information and clicks submit. I have been able to verify
that ONLY the PHPSESSID is getting passed from the form. All the other
form vars just disappear!
* I use $_REQUEST in the PHP script that processes the form.

View Replies !
Repeat Form Field Based On $_POST Data
i have a script that sets up a second page with multiple select boxes. the first script has a hidden field for the ID number, and a text input field for quantity. the second part of the script has a foreach loop that gets the info that goes with the ID number and then creates the select box next to it. for the most part it's all working correctly, but i don't know how to get the submitted "quantity" to repeat that ID number (and everything else). here is the initial form: Code:

View Replies !
Submit The Data In The Textarea
Why is it that i cant submit the data in the textarea? it wont let me submit PHP Code:

View Replies !
Amount Of Data On Submit
Is there a limit on the number of characters that can be submitted at once through a form?
I built this little emaildatabase and want to submit like a 1000 addies a time, seperated by comma, but somehow not all the data is sent through, is there a limit and if yes, is there a way to work around?

View Replies !
Submit/insert Data
i have this error when i try to submit/insert data into the database. the following error:
Error in query INSERT INTO (ttNo) VALUES (ðu') You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(ttNo) VALUES (ðu')' at line 1

is it my source code or my database?

View Replies !
How Does PHP5 Process POST Data In Creating $_POST Array?
I need to save a wav file that is HTTP POSTed to a php page.
What does PHP5 do automatically to a POSTed variable when it puts it in
the $_POST[] superglobal array? I haven't been able to find any info on
this....

I have a script that does what I want in PERL, but I need to do it in
PHP.
I think the PERL does something magic when it does this:

#### PERL CODE ####
read ( STDIN, $buffer, $ENV { 'CONTENT_LENGTH' } );

@pairs = split ( /&/, $buffer );

foreach $pair ( @pairs )
{
($name, $value) = split(/=/, $pair);

$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

$FORM { $name } = $value;
}
#### END PERL CODE ####

View Replies !
Refresh The Page After Submit
Does anyone know how I can automatically refresh the page after the script is executed ( after user hits submit) and the database is updated, so that the line "The main office is now..." shows the new entry into the db? Thanks.

View Replies !
2 Submit Buttons On 1 Page
I have this code :

<INPUT TYPE="Submit" VALUE="Change Password" name="ChangePasswd" TABINDEX=4>
<INPUT TYPE="Submit" VALUE="Login" name="action" TABINDEX=3>

Problem : When the enter is pressed, the first submit is executed. -> "Change Password". I want that when enter is pressed that the "Login" button is triggered.

Is there a possibility to set the enter to "Login" without changing the the place of the buttons??? (if I put "Login" button before "Change Password"; Enter does the "Login", but this is no option)

View Replies !
Page Will Download After I Hit Submit.
I have a registration form that works well. It updates my DB and also sends the new member an email. The problem is that when the member fills out the registration form and hits enter the page does it's thing and then tries to download to the desktop. I get a download window alert that asks what I would like to do with "index.php". What can cause this?

View Replies !
After Submit How To Automatically Go To Another Page
I have a page that does a security code check before moving on to a form. Instead of a click here to continue after a corerct code is entered ... that I have at the moment, I want the page to automatically go to another page with out having to click anything. Code:

View Replies !
Page Crash After Submit
i have rather a large form and mean pretty bloody big. I populate this form with values already saved. I grab the delimetered string from the database and explode it then sort them in an array. This array then shows the corresponding values in the fields.

Once i submit it sometimes it goes to the right page and sometimes the page just stops and says page cannot be displayed. Like it crashes or its trying to do too much at that point. I would post code but there is a hell of alot of it. Is this problem well known? And is there a solution?

View Replies !
Saving Form Data Without Submit?
I could need some advise on a form / form processor I am working on. Normaly I store all form data through php into a class variable for later use. I do this by submitting the form. However I would like to ease the usage of my form and would want each form field to store its' information "onChange".

I did this before with "onChange=thisformSubmit()", but that's not acceptable in this case. Is there any other sensible method to save fields individually? maybe using Ajax? Maybe there's a good tutorial somewhere?

View Replies !
Submit Form Data In Particular Encoding
I use some forms with search fields to look up some terms in external dictionaries. However, data need to be send in particular charset (for example, page with external dictionary uses windows-1250, so I need to submit data in windows-1250 charset to work properly).

I tried to use form's attribute accept-charset for this - works fine in FF, but not in IE, it seems to ignore this attribute. I also tried to set POST parameters in header manually in desired charset, it would might work, but then the page gets loaded without CSS etc, bare HTML gets downloaded only..

View Replies !
User Must Submit Twice For Data To Send
For an odd reason that I cannot figure out on my own, when a user
attempts to log-in on my Log-In page, they must press the submit
button twice.

They fill out their credentials (username, password), then press
submit. The postdata is indeed sent the first time around. I used echo
to show the values. Then a second submit is required for the if
control structor to initiate the log-in sequence. This happens on
index.php, the login.php page is included into index.php.

This if statement looks for a session variable named "validated":

// On index.php
if ($_SESSION["validated"] == true) {
// do stuff when the user is logged in (include files, ect)
} else {
// include the login page
}

However, the login page has a control structor looking for the
presence of a $_POST variable...

// On login.php
if ($_POST["submitted"]) {
// initiate validation function, return value into a variable
if (/* Authentication variable returns true */) {
$_SESSION["validated"] = true;
}
}

I bet the issue lies in the order of the predefined variables, right?
In my PHP.ini, the variables_order setting is set it it's default of
EGPCS; Evironment, Get, Post, Cookie, Server. Is it that Post
variables are being sent in the login.php to check if "submitted" is
true, then the session variables sent to index.php on the second
submissial?

View Replies !
No Longer Submit Any Data From Forms
On my three development boxes I run Gentoo, BSD and Windows with practically the same PHP config along with Apache 2. A project I recently completed was just uploaded to a client's server running Apache 2 and PHP (5.2.1). I can no longer submit any data from forms: Code:

View Replies !
Data Not Passed To PHP File After Submit
I am using PWS as my server. I enter data in addToForm.html file and then click the submit button, but the processForm.php file always indicate that the variables are empty. It appears as if the data is not passed to processForm.php file. Code:

View Replies !
Header - Submit The Data On To Another Form
I am taking all the user input in one form and submit the data on to another form for processing the data. Once the data is processed i use the below code for redirecting it to another page.

header("Location: http://www.example.com/folder/mypage.php");

On development server it works perfect, but on my production its not working.
What couid be the issue in this?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved