Can You _POST Variables In Php Without Using A <FORM>
The question I have, is it possible for a php script which is used to
validate values submitted in a form, to then post these values onto
another script/page or even back to the calling form?
i.e. the application I have in question is a login.htm page with a
verify.php script The login.htm has a Form which captures login_id and password which are posted to verify.php
verify.php checks the id and password against the database.
if the check succeeds I use $_SESSION to track the logged in user into
the page. if the check fails, I use $_SESSION["error"] to set an error message
and then jump to login.htm, but I've lost the userid.
The only way I can see of transferring the userid (and some other data)
is by calling header ("Location: login.htm?id=$uid");
and then have some php code in login.htm to $GET['uid'] and pop that
into the user field on the form.
Is there any easy way I can post this data back without using a <FORM>
or at least a form that can be auto-submitted?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Getting $_POST Variables From Form In A Function
I've loaded various thoughts I've collected into mysql. I want to write an app, all in one file, that has the following features: 1. On initial entry, selects and displays the thoughts ( might add pagination later - there aren't alot of records, for now.) 2. This main page includes separate forms near the top with submit buttons to search, add a thought, view all thoughts, etc. The action for each form is to call this same page. The submit buttons and thoughts are printed from a function. 3. In the main logic, I am trying to do a $_POST and if isset() on each submit button name and then call a corresponding function, do whatever it has to do, unset the form variable and continue back to the main display. The problem is that it's not calling any functions. The error log says that the name of each submit button in my $_POST[] statements in the main logic is an undefined index. I presume that they are undefined in the main logic because the forms were defined in a function. Is there anyway to access, in the same page, form variables that were declared in a function on that page?
Getting All Variables From $_POST
I have a form with a bunch of checkboxes with the name of their ids and the value delete, when you click the submit button, it's suppose to delete the entryids that equal "delete" from the database so it looks like this Code: <input type="checkbox" id="135" name="135" value="delete" /> now how can i get like an array or something of all the ids that equal "delete" so I can delete them from the database.
$_POST Variables
I have a mysql box that has a private network ip. The old developer was running our web server on this machine but the company since retired the box and it is in a closet, still running, but sad and alone, aliased as oldserver.mycompany.com. Now I am finding out that I need to use some of the funcitonality in the scripts that are on the old box. So, I just installed PHP on our new IIS webserver. I have a form that he built which collects information from potential clients and then passes it on for entry in the database (on the old box), sends out emails, does calculations, and so on and so forth. It does a lot, actually. I cannot build a form to pass directly to this mysql box because it does not have a public IP. I cannot submit directly to a private IP. Found this out recently. So I was thinking I could have the form submit to our web server, and they my web server could in turn submit the $_POST variables to the private box. This should work, no? My problem is, I need to create a file on my web server that will do nothing but take the $_POST variables and hand them off to the private box for processing. How can I take $_POST and repost it? It is probably not difficult, but I am new to PHP. I have looked, cannot find the answer. I would not be able to press a button, so the submission would have to be automatic. Is this possible? Can you help? I truly appreciate it. I need to get this up... as a temporary solution... then I can try to duplicate the functionality on the private box with the web server. All I want to do is take the $_POST variables from the form and pass them to an intermediary script that is able to talk to the private box, and then have that intermediary script pass them along again as a $_POST array.
Missing $_POST Variables
I use $_POST variables to process forms. I just pushed some code to a client's server. Their server does not have $_POST,$_GET, etc variables defined. Only the old $HTTP_POST_VARS, $HTTP_GET_VARS, etc variables are present. phptest.php shows they are running PHP Version 4.0.4pl1 on Linux with Apache. Is there a configuration setting to 'turn on' these variables? Is their version of PHP too old?
PHP Passing Variables _POST
On page script out of book, trying to upload files. Serving files of my own ubuntu computer. wrote the script right out of the book, nothing happened. added $sting = $_POST['string'] and i could echo out string. the script is variable variables, so just putting all _POST request is not really possible. Is this a server issue? Am I Making any sense?
$_POST Variables And Persistence
I was wondering how it would be possible to make $_POST variables persistent after a user refreshes the script. The problem I have on my page is that when the user hits submit to make a change to the page, it clears the $_POST variables from the previous submission which I need to use on the updated page.
Globalizing $_POST Array Variables
I'm trying to come up with a function that will globalize each element in the $_POST array, effectively mimicking the php.ini 'Globals = On' setting for the $_POST array. So far I've created a minimal recursive function that takes an array as argument, parses each element in the array and checks if it's an array or not, if it is an array it's passed recursively back to the function, otherwise the element is made 'global'. The function looks like this:
Passing $_POST Variables To Classes
I'm starting this new project in which I'ld like to implement sort of a design pattern I have seen being used in the CodeIgniter framework. Basically, the site will examine the URI and based on the segments of the URI it will fire up some controller class, for instance, say I have an inbox in which end-users can view messages they got from other users, they'ld start at: This will then call upon the function view in the class inbox: class Inbox extends Controller { // ... public function view() { // ... } // ... } Any trailing segments of the URI will be passed as supplement arguments to the function. Now, if $_POST variables are sent to some page and are needed by the called upon function in the appropriate class, would it be bad practice to simply extract those $_POST variables from the superglobal $_POST inside this function? Preferably I would like to send the $_POST variables as arguments to the function, but I'm not sure how to implement this correctly, nor am I even completely sure as to why this would be better practice, other than that the function will only accept predefined arguments. What are your views on implementing such a 'pattern' (if you will). Would you even suggest such an implementation, or am I bound to get into trouble with proposed pattern?
Passing $_GET, $_POST Variables To Command Line Php
I'm trying to test some cgi php, but do not have access to a webserver (in any way, shape, or form). I've been trying to fudge testing by using the CLI php.exe in the windows distribution. I've read all the faqs about the CLI and I'm not sure if there is any way to pass the $_GET and $_POST variables. I have yet to find any information on this topic online, either. If anyone has any ideas of how to do this or a better way to test, please let me know.
Posting Multiple Variables To $_POST Using HTML Forms
This is my code : <FORM ACTION="php_steptwo001.php" METHOD="POST"> <INPUT TYPE="HIDDEN" NAME="duration" VALUE=3> <INPUT TYPE="HIDDEN" NAME="banner" VALUE="test"> <INPUT TYPE="SUBMIT" VALUE"3 DAYS"> </FORM> Only the 1st Variable 'duration' gets passed!
Getting Form Values Without Using $_POST
I just started supporting my first php app, and am attempting to set up a development copy locally on my pc. In some places in the application, forms are submitted and the values retrieved w/o the use of $_POST['inputname'] (the form method is post.) This works on the production site, but not locally. I've made sure the php.ini is the same, and I can't find any other hints as to why this might be. Using PHP5 w/ Apache 2. I don't want to have to modify a bunch of working code I'm not yet familiar with to get it to work on my pc, thought maybe this would be a no-brainer for the experts. Sample code below. Code:
$_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.
Dynamic JS Form And $_POST Array
I have a form that I am altering after page load with javascript. Basically I have a button that inserts another text field into the form which the user can fill out. Its for a calendar, and I'm allowing them to optionally add multiple days for an event. Each box that is created has the same name with [] on the end to make it an array. When I view the post array with print_r($_POST), only the first textbox's value shows up. This is the only textbox in the form when the page loads. Simplified example: <form name="calform" action="process.php" method="post"> <input name="startday[]" type="text" class="bordered" size="25" /> <input type="button" onclick="add_one_more()" value="Add another date" /> // if the user hits the add button it adds this input field after pageload <input name="startday[]" type="text" class="bordered" size="25" /> </form> And here's what I'd get from that form Array ( [startday] => Array ( [0] => test1 )) A button inside the form basically adds another <input> tag between the <form> tags. Why isn't PHP seeing the data?
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.
How PHP $_POST Gets The Multiple Values From A HTML Form?
I am try test a simple HTML form with PHP <form method=POST action="testing.php"> Cat <input type="checkbox" name="pet" value="cat"> Dog <input type="checkbox" name="pet" value="dog"> Pig <input type="checkbox" name="pet" value="pig"> <br> <select name="dates" multiple> <option value="Monday">Monday</option> <option value="Tuesday">Tuesday</option> <option value="Wednesday">Wednesday</option> <option value="Thursday">Thursday</option> <option value="Friday">Friday</option> <option value="Saturday">Saturday</option> <option value="Sunday">Sunday</option> </select><br> <input type="submit" value="Submit"> <input type="reset" value="Reset"> </form> When I checked cat, pig and selected Tuesday and Saturday from the form and click submitt My testing.php is <?php $pet = $_POST['pet']; $dates = $_POST['dates']; print_r($pet); var_dump($dates); ?> The $_POST['pet'] and $_POST['dates'] are NOT return as array nor multiple strings seperated with a comma. It only return the LAST string I have checked and/or selected. How do I get the multiple values from the checkbox and the multiple select from a HTML form in PHP?
Cannot Read Information From Form Using POST Or GET ($_Post Is Empty)
I am having problems in my php code. I am relatively new to php but I know some basics. This is the problem: when i try to echo some information that is typed into form back to the screen i get absolutely nothing. It seems like $_POST['name'] is an empty string, along with $_POST and $_GET['name']. I looked around to see if someone else had the same problem and found that some people's code didn't work because of IE6. but i also tried mine on Netscape and i got the same problem. So why is $_POST empty after posting information. Even $_GET was empty. all of those returned empty echo $_POST; echo $_POST['name']; echo $_GET['name']; here is the code: the code was originially meant to send an email but i commented the if statement out to see why it wasn't working <html> <head><title>Feedback</title></head> <body> <?php // Handle POST method. //if ($_POST) //{ $name = $_POST['name']; $email = $_POST['email']; $comments = $_POST['comments']; // Compose simple text message: $message = "Message from $name ($email) Comments: $comments"; // Send message to bob@microsoft.com mail("email@email.com", "Feedback", $message);
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:
Form Variables To Session Variables
I am writing a small script that consists of two pages: page one displays a bunch of values from a DB (ie. First Name, Last Name, Phone Number). On this page you will find a form that follows this format: <input type="text" name="edit_firstname" size="20" maxlength="35" value='Bob'> <input type="text" name="edit_lastname" size="20" maxlength="35" value='Smith'> <input type="text" name="edit_phone" size="20" maxlength="35" value='5552222'> So when you see the page there will already be a 'default' value in each line (which is information extracted from a DB). This works perfectly and has been tested thoroughly. On the second page I have the following code: $editfirstname = $_POST['edit_firstname']; $editlastname = $_POST['edit_lastname']; $editphone = $_POST['edit_phone']; What I am trying to do is this: the default value for edit_firstname from the form is 'Bob' by default, but the user can change this in the input field on the first page. This value, whether changed or unchanged, should then be stored as edit_firstname and by calling up the function $_POST[''] on the second page I want to transfer the value to the variable $editfirstname. However, it seems that $_POST['edit_firstname'] and the other fields do not return a value at all, hence $editfirstname = '' or $editfirstname = 'NULL'. I have never tried to do things this way before.
Following Up Form Variables
i've coded a website to take information from a user, and then output it to a printable page to send in. The site is actually for a non-profit org, and this is for a contribution form. I have a checkbox place to put into a variable called $bird[]. $bird[] prints out fine on the page directly after, but how do I keep the value of it and send that variable on to the next page? So on the next page I can also print out the value of $bird[]. On the second page, I used: PHP Code:
Form Variables
Wonder if there is any way to check all variables through a loop when a form is submitted. I have few checkboxes (chk1,chk2,chk3...) in a form and in a php file I wanted to go through a loop to check which checkbox is 'on' and then so something with that variable.
Using Variables From Form
I've just started learning php and I hope you guys could help me with this problem. I've found a useful pice of code from a book to make a form and I would like to use it. I would like to print the variables (input) on the screen , but I can't make it work. I think I have to do something with an array, but don't know what. I've tried $field = $_POST['field']; echo $field; and also $arr = $_POST['array']; print_r($arr); but it doesn't work. Could some one show me what I'm missing? ########################### code ################################### <?php // new function echo "<br><br><h4>second function</h4> "; function print_form($action="", $method="post") { if (empty($action)){return FALSE;} echo "<form action=$action method=$method> "; $numargs = func_num_args(); for($i = 2; $i < $numargs; $i++) { echo "$i <input type = text name =". func_get_args($i) . "> <br> "; } echo "<input type=submit>"; echo "</form>"; } print_form("autoform2.php", "", "field", "field2", "field3", "field4"); // testing if the variable exist...and it doesn't... if(isset($_POST['field'])){ echo "exist"; } else { echo "does not exist!"; } ?> ########################### end code ##################################
Form Variables Without Submit
Is there a way to pass variables from a form to PHP without submitting the form? ie. retrieving a user's selection from a picklist or checkbox.
Find Form Variables
Is there a way to read the variable names passed by a form if you dont know their names. I have a site where the users can edit a form but I need to then process it.
Passing Variables From A Form
Well I am having some strange problems with a web-based form that is used for users to submit data. I have moved the form and accompanying PHP files across from a Redhat 7.3 install to a new Redhat 9 server running Apache 2.0.40-21, with php-4.2.2-17. So, it is stock standard. Everything was working ok on the Redhat 7.3 install. The troubles I have run into is when I try and pass a variable from a form such as below: Code:
Passing Form Variables To A Pop-up
I've searched the forums for this, but haven't seen any posts or solutions about this particular problem...I have a form in a php script that submits like this: Code:
Form Variables Gone Missing
hope I'm on-topic here - couldn't find any leads with a search so maybe someone has an idea. I've got a PHP form that is supposed to set some variables from its fields and then call itself by the POST method. Here is e.g. a minimal test version called "top.php":- #!/usr/bin/php Content-type: text/html <HTML> Welcome <?php echo $_POST["name"]; ?>.<br /> You are <?php echo $_POST["age"]; ?> years old! <br> Welcome <?php echo $name; ?>.<br /> You are <?php echo $age; ?> years old! <br> <form action="top.php" method="POST"> Enter your name: <input type="text" name="name" /> Enter your age: <input type="text" name="age" /> <input type="submit" /> </form> <? phpinfo(); ?> </HTML> When I enter data in the fields name or age, it just gets ignored, goes missing, thrown away by PHP. The first 4 lines that should output this info show that the variables are all blank. The phpinfo() call at the end shows me clearly that register_globals is on. The only way I've found so far is with the GET method - there the expected arrays and variables are also broken, but $_SERVER["REQUEST_URI"] is correctly set (yipee!) and so I can parse that myself - sort of defeats the point of PHP though. What could be the problem here? Is there some other setting I'm missing? This stuff all worked without a hitch in PHP3 - has something else been broken in the name of security?
Passing Variables Through A Form
I have a setup where I am displaying lots of information, all of it comes from contact forms and is stored in a database. Then can be viewed on one page, through the scripts. One feature is that you can click on an email address to send an email to that specific user. When you click their email, the form comes up fine, and I have been playing with this for awhile.. I am having trouble getting the variables passed through so that I can send the email and update the database. Code:
Passing Form Variables
I'm trying to make a page that will let you change the order in which some items are displayed. The problem I'm having is passing back the id value of the item that you want to move up or down in the display order. Here is the code:
Passing Form Variables
Is there a way to read the variable names passed by a form if you dont know their names. I have a site where the users can edit a form but I need to then process it.
Session Variables In A Form
i want to create a form that updates a users account details...is there a way that i can get the form to show the users current details in each text box? then the user clicks on that box to edit the deails? also how would i structure a query so that it only updates the edited fields? and keeps the rest the same? Code:
Form Variables And Text Characters
Well I´m having trouble with text formatting I think. You see I have a flash form, which sends variables via POST to a php file that looks like this:
Passing Variables Through FORM -> IMAGES
I have to say this is bugging me, I'm trying to pass a variable through a form, but instead of "select" then "submit" type of form, I am trying to use IMAGES instead... I am trying to pass the variable ($lang) , depending on the value of this variable, the page will look different (English or French ) I guess I am doing this the wrong way, I thought by giving both images the same name, but different values, it would work.... but it is not working. here is the HTML code of the form itself : Code: <!--LANGUAGE SELECTION --> <FORM NAME="pick_lang" METHOD="post" ACTION="<? echo "$PHP_SELF"; ?>"> <table border="0" cellpadding="0" cellspacing="0" width="165"> <tr> <td rowspan="2"><img name="shadow_drapeau_r1_c1" src="tble_img/shadow_drapeau_r1_c1.gif" width="102" height="21" border="0"></td> <td> <INPUT TYPE="image" BORDER="0" NAME="lang" value="en" SRC="tble_img/shadow_drapeau_r1_c2.gif" WIDTH="21" HEIGHT="14"> </td> <td rowspan="2"><img name="shadow_drapeau_r1_c3" src="tble_img/shadow_drapeau_r1_c3.gif" width="8" height="21" border="0"></td> <td> <INPUT TYPE="image" BORDER="0" NAME="lang" value="fr" SRC="tble_img/shadow_drapeau_r1_c4.gif" WIDTH="21" HEIGHT="14"> </td> <td rowspan="2"><img name="shadow_drapeau_r1_c5" src="tble_img/shadow_drapeau_r1_c5.gif" width="13" height="21" border="0"></td> </tr> <tr> <td><img name="shadow_drapeau_r2_c2" src="tble_img/shadow_drapeau_r2_c2.gif" width="21" height="7" border="0"></td> <td><img name="shadow_drapeau_r2_c4" src="tble_img/shadow_drapeau_r2_c4.gif" width="21" height="7" border="0"></td> </tr> </table> </FORM> <!--END LANGUAGE SELECTION --> I don't want to set images with links (<A HREF="$PHP_SELF?lang=$lang"> works, but I want the URL to remain clear of data)
Form Variables Not Printing In E-mail
This is my first attempt at a php-based form at work in order to personalize the form response with the submitter's name. When I submit the form, all that's returned to me via e-mail is the header information. I've been searching google but can't figure out what I've done wrong. The php to process the form is this:
How To Make PHP 'grab' Variables From A WML Form
I really can't get forms to pass data to my scripts. Now someone mentioned something about grabbing it and posted some code, but for the life of me I cannot find the email/post/whatever the hell it was, so can someone please tell me how a PHP script can be made to 'grab' a variable from a form.
Pass The Variables In The Form Of Sessions
If I have something like this how can i pass the variables in the form of sessions to another page, where i Can calculate based on the products selected, very much like a shopping cart! PHP Code:
Editing Submitted Form Using Variables
I'm working an e-mail form for my web page. I want people to be able to fill out information and when the click submit, get a page that basically says, "Here is the information, is it correct?" Then they can click either, "Yes" (and it sumbits), or "No", and it goes to another page set up like the form filled out the first time, and grabs the variables and places them in the "values". This is the code I have so far: Code:
Variables Not Passed From Url Or Form To Page
I use a Mac at home running OSX 10.2, and use the Apache PHP MySQL trio for developing and testing sites. I've had very good experiences with this setup and have had no major problems till now. I noticed recently that variables added to the end of the url (the get method, ...url/page.php?var=value) are not passed to the script within the page. Forms using either the get or post method have the same problem. For example, a page named "foobar.php" containing this: Code:
Form Variables In The Address Line.
I have created a form with hidden variables and submit button which initiate downloading of a new page. After submit-button is pressed and new page is downloaded I can see values of all hidden variables in the address line of the browser. It is strange that another form does not produce this effect (variables in address line). I cannot find out which difference in forms originates different behavior. May be you have some ideas?
Form Variables Not Being Read By Php Script
I've got an HTML form that submits to a php script. Now, this was done on one server, and worked perfectly fine. I upload to another server, and the variables are not being read by the script at all! If I set method=get, the variables are in the url, but the php code doesn't seem to be getting them at all. any suggestions?
Form Button Names As Variables
perhaps I am just a little tired, but I am having trouble with my form buttons. Firstly I name them like this name="round".$counter."heats" which results in variables $round1heats $round2heats $round3heats etc... now, when I select button named ... "round1heats" ... I want to use the variable $round1heats to remove the button "round1heats", and display heats set for the round. To do that I assumed that I would have to:- IF(isset($round1heats)){ show other stuff instead etc }else{ generate and print html for button "round1heats" } My problem is, since all this is dynamic, since the number of heats is variable, and is dependant on DB entries, how do I generate the $round1heats used in the isset() so that it is recognised as a variable by the isset(). I have tried, to concat the bits as I have done in the naming of the button, but, unsurprisingly, it spits out errors ;) [note, $counter is still available, and is limited to the number of rounds registered in DB.] OR, have I been barking up the wrong tree altogether?
Missing Something In Passing Form Variables
I have the following code to select an item from a drop down menu and call the same script over again. I am expecting that after the first time the script is run the first echo would produce the selected PBX name (e.g. FMSite) but instead I get FMSitepbx=FMSite. Needless to say this screws up the further processing I want to do. What I really want to do is set a cookie containing the selected PBX name so other scripts can get the cookie and provide specific data. <?php echo($_POST['pbx']); $dbcnx = @mysql_connect("localhost", "***", "**********"); if (!dbcnx){ echo( "<p>Unable to connect to database.</p>"); exit(); } if ( !@mysql_select_db("inet") ) { echo( "<p> Unable to locate the iNet database. " . mysql_error() . "</p>" ); exit (); } $query = 'Select Name from PBX order by Name' $result = mysql_query ($query) or die ('Query Failed'); echo '<form action="setpbx.php" method="POST">' echo 'Select PBX <select name="pbx">' while ($row = mysql_fetch_array ($result)) { echo '<option value="' . $row['Name'] . '">' . $row['Name']; } echo '</select>' echo '<input type="submit" value="Submit">' echo '</form>' ?>
Keeping The Variables From Form To New Page
On a web page that I am working on there is a lead generator on the left side that asks for the persons name, phone number and email address. Currently when someone fills in that information and clicks "continue" it will send an e-mail as well as inputs that data into mySQL database. What I want it to do is just that but then take the person to a continued form asking more questions, but without them having to re-fill in their name/phone/email. Basically this "continued form" can be accessed seperately, so it cannot be something where the continued form only works once someone fills out the mini form on the left side of any page on the site. Code:
Sending Variables To An HTML Form
I have a form in an html file that sends to a PHP file for processing. The information is properly sent to the PHP file and it is processed and validated. What I want to be able to do is this: If there are errors in the form (found in the PHP validation), send the user back to the HTML form with the form still filled out with the information that the user had entered. I do not want the fields with errors sent back, just the good information. There are two seperate files, the html file and the PHP file.
Displaying Variables In Form Objects
I'm trying to display information within a lookup box and a text area box. Here's the code for the form objects: <TEXTAREA NAME="BodyText" CLASS="InputTxtBoxes" MAXLENGTH="10000" COLS="100" ROWS="20" VALUE="<?php echo $BodyText ?>"></TEXTAREA> <SELECT NAME="AuthorName" CLASS="InputTxtBoxes"><OPTION VALUE="<?php echo $AuthorName ?>"></OPTION> When I print these variables out they do contain the correct values, but when I try and display them within these form objects they don't work at all. The BodyText is stored in a blob in the database and usually contains relatively large amounts of data (300 - 500 words). Any ideas?
Changing Variables In Another File Through A Form.
I'm trying to change the value of some variables in an include file through a form. I have modsettings.php which contains the variables to change, and modarmin.php which has a form that contains radio buttons which need to switch the variables in modsettings.php to either true or false. Then refresh the form page with the updated values. Currently when I submit the form I am taken to the file modsettings.php and the variable values are not changed. PHP Code:
Populating Form Fields With Variables
The script itself works fine: mail gets sent. If there are any missing fields the form displays again with a list of the missing fields, but I can't get the form fields of the reloaded form to be populated with teh existing values. PHP Code:
Passing On Variables On Form Using HIDDEN
I'm trying to pass some variables from a "php_self" type form. So, far I'm trying the HIDDEN input type in order to pass the variables once the form reloads. The form returns with empty fields. Once the values appear I have to make the form add the values for each loop iteraction. (there's a for-loop creating the table rows dynamically.) PHP Code:
Form Variables Not Sent To MySQL Problem
Here's my setup: PHP5, mySQL, IIS6, Win2003 I have no problems serving up PHP scripts, and I can access the DB. The problem I have is this. On pageA.php I have a form. I post this to pageB.php which adds a date variable and then is supposed to insert the form data (along with the date variable) into the DB. The problem is, none of the form variables are being send to the DB. My code was working fine on a different host(different platform config.) So I suspect that it is a config issues, but don't understand why the data from the form isn't being passed to the DB.
Can A Form Change Session Variables?
In the first page I declare a session variable. Than, on the same page, I make a form which contains a variable which has the same name as the mentioned session variable. Pressing the "submit" button of the form I go to the second page which immediately redirects me back to the first page (with the "header"). And the mentioned variable does...
|