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




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:




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Eliminating Passed URL Variables For Multiple Listings On A Page
I have a page with a list of several users, each hyperlinked to another page of 'more info' about that user. The hyperlink contains the UserNumber, UserRegion, and UserStatus, and the receiving page picks up the data in the passed URL. This works well, but I'd like to eliminate the passing of these variables in the URL.

One way is to make a graphic ('More Info') that can be clicked to submit a form. Each 'More info' graphic from the dynamically created page could hold the UserNumber, but how can I pass several variables with a single click? On some pages, there can be 100+ users, and I hate to have 100+ separate forms and hidden fields.

I thought of using session variables, how can I know which user was clicked to set the session variables?

PHP Not Populating Form Variables Passed Through POST Or GET
I"m running:

Windows Xp SP2
Apache2
PHP5
MySQL4

Everything seems fine and dandy, and I can do scripting on server side, but for some reason I cannot get data from a form to be put into a variable.

I have a simple form in an html page which submits, and in the php script that handles the input, none of the data in the form is going into the variables.

My php.ini file does have all the GPC's in place(ie variable_order, the way they get processed).

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:

Variables Passed Between Functions
I have a function that fills the value field of a form with 2 possible variables but they are not getting set so when you view source you just see value=""

I also try echoing these variables to see if they are getting set but they are not.  Is it becuase they need to be set to global? Code:

Problem With Form, Variables, And Refreshing The Page
I use php 4 and mysql.

I am quite new to php. I have looked high and low for a solution to
this problem. It has to do with my lack of understanding of variables,
I think.

I have created a simple php file that has a form at the bottom where
the user can enter data that will update the page he is on. When the
user click the submit button the data is copied into the table and the
web page shows the new record along with the others, as it should.

However, if the user later refreshes the web page, the data in the
last form is entered again into the table.

To prevent this I have tried something like this:

if($fname!="")
{
$fdatetime = date('Y-m-d h:i:s');
if(mysql_query("INSERT INTO comments(fname, femail, fcomment,
fdatetime)
VALUES('$fname','$femail','$fcomment', '$fdatetime')"))
{
$fname ="";
}
else
{
echo "could not insert the data, sorry!";
}

}

I thought $fname =""; in conjunction with if($fname!="") would solve
the problem, but no such luck.

The elements in the form are named fname. femail, fcomment.

One more question, instead of echo "could not insert the data,
sorry!"; I would rather like to post a message in a messagebox of some
sort. Is that possible

Passed Variables In Included Files
I'm looking for a guide on how variables are handled in included files. A pitfall I've run into is that if I define a variable, then include a file, the variable can be displayed on the included file. But if I try to call that same variables on the included page within a function, the variable is undefined. Example: PHP Code:

Showing A Different Page When A Variable Is Passed
this is the code i have just now

<? include 'code.php' ?> //where variables are kept

<?
$welcome = $_REQUEST['welcome'];
$leave = $_REQUEST['leave'];
if ( $welcome )
echo $page['welcome'];
if ( $leave ) {
echo $page['leave']; {
} else {
echo $page['redirect'];
}?>

what i want to do is, if the variable passed is "welome" i want it to show a welcome page and if "leave" is passed i want it to show a leave page, and when no variable is passed i want it to redirect to a totally different page

like this:
index.php?welcome
Show welcome page

index.php?leave
show leaving page

index.php
redirect to a different page

Encrypting Variable Values Passed Thru A Link In A Web Page
I am working on a project in PHP / Mysql on linux platform. The project has a login page where any registered user is supposed to login before he/she can have access to some major functionalities in the project.

Since I need to check the authenticity of the user in other secured pages, I have to carry forward the username with which he/she has logged. As I am doing so, the username is appearing in the url. This of course is a major security lapse.

Values In Form Not Passed Using Onclick ?
i have a php file name main.php i want to do a post and not a get since this action is to delete a row in the database. however, when i try to do a href onclick, the values are not passed to the main.php. why ? Code:

echo "You have " .$votesattach. " votes for this quote. Delete the Quote and Votes ?";
echo "<form name=send1 method=post action=main.php?action='deleteit'>";
echo "<input type=hidden name=action value=deleteit>";
echo "<input type=hidden name=which value=$delete>";
echo "<input type=hidden name=userno value=$userno></form>";
echo "<a href=main.php onclick=document.send1.submit()>YES</a>";}

how do i do pass values to the server using a post method ?

When A Value Passed In Form Or Q'string Is Empty..
I am trying to figure out how to deal with when not all elements
in a submitted form are filled out or when page expects a query string
and doesn't get one.. I tried the two conditionals below, but still got
errors:

$param= $_GET['msg'];

/*
if ($param != "") {
echo $param;
}
*/

if (isset($param)) {
echo $param;
}

query string is:

home.php?msg=selected records have been deleted from the database.

(referrer pg is not always pg sending query string.. so need to deal
w/when no query string is passed..)

Page Expired After Going Back From Del. Pageto Form Page Where Comment Is Submitted..
i've made a submit comment form with php and mysql, the form has an action to itself with a hidden var like this: input type=hidden action=add

When i delete a comment on the page i go to a page called delete.php3 and there is a link with a javaline which goes -1 back in my history..

When ive added a comment, the comments page contains action=add and when i delete a comment, i want to click on the link to go back to the comment page, but then, it doesnt work and it says:

Page has expired.

I wondered how to deal with this kind of problems........

Session Var Is Setting ONLY AFTER I Reload Page, Form Var Displays First Page Load
Page1 has a form that calls Page2. The beginning of Page2:
<? php session_start();
$s=$_POST['sSelected'];
session_register("s"); ?>

in the middle of Page2 I have a form varaible:
<?php echo $_POST['stateSelected']; ?>
<?php echo $_SESSION['s']; ?>

The form var displays the first time the page loads. The session var
displays only after reloading the page2.

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. 

Dynamic Form Fields/multiple Page Form?
It is for a friends out of print booksite, where visitors can request multiple books to be searched by adding one at a time to a cart (javascript), then once all added they submit to another form where they enter their personal details and all is sent through. The problem is at the moment they cannot change whats in the cart without refreshing the browser window and losing everything.

1) present for asking how many books they want to search for
2) display multiple rows of the same input fields depending on how many books they say they want to have searched for?i.e

title|author|publisher|etc
title|author|publisher|etc
title|author|publisher|etc

3) when these are submitted they could see these above the next part of the form where they enter their details with the option to go back and delete/amend.
4) send all the info to my colleague.

if so has anyone seen a similar script that I could take a look @ to see if I can hack it to suit my needs?

Error In Page When Checking Http_get_vars("myvar") And "myvar" Was Not Passed In URL String
PHP, coming from ASP coding

if (HTTP_GET_VARS['b']==1){
print "Yes";
}else{
print "No";
}

when "b" is not passed via
(http://www.mydomain.com?b=1

an error occurs and the "NO" is printed but an error is printed too.

How can I check for the value of "b" so that no error occurs if b is
not passed??

example

http=www.mydomain.com

$myvar=HTTP_GET_VARS['b']

causes an error because
"b" does not exist (ie. its not passed in the URL string.

$myvar maybe evaluated as NULL or Empty but the error is printed in
the page, anyway.

Variables From Another Page
I am working on something and was wondering if the following is possible... ( I have tried it and am getting a blank instead of the value required).

Do I have to declare the name variable in Page1... or is there a way to go around it?.. One solution could be sessions...but Is there another solution? Code:

Transfer Variables To Another Page
I have a script that on the first page is a form for users to fill out, when they choose to submit the form it goes to another page that actually processes the form to my MySQL database. ATM I use statements like this to carry over those values:

$article_author = $_POST['news_author'];

Is there a better or more effecient way to do this? It's not too bad on a short form, but typing out all those lines for a long form is tedious.

Getting Variables From One Page To Another Without Globals
I have this problem getting one variable from one page to another. I don't want to use globals since they arent very good i've heard. (this is how i've done it in the past)
Now, i thought of doing a form post from every page and posting everything forward but it seems silly, also, i don't think i want to store all the information i used to keep as globals as cookies, it seems to me to be just as insecure.

This must be a common thing to do in php and so i'm kind of wondering how to get it to that other place? Is there some kind of special way to put it there?

Passing The Variables To More Than One Page
I have an initial page 'page_one.php' that sends the data to another one - 'page_two.php' using form. It sends a couple of variables collected from the user input. Now....'page_two.php' has header function before any html that is either skipped or executed based on the user selection. If it doesn't come to header everything is fine, but if it does - header redirects 'page_two.php' to 'page_three.php'.

Now, I want to be able to view all the selected variables in 'page_one.php' in my php code in 'page_three.php'. In another words, how do I pass the variables to page_three.php if it's not declared in action='...' located in 'page_one.php'?

Getting Variables From A Forwarded Page
im looking to include a page in my php file, for example http://othersite.com/foward/15052 (I think its with Header("")), forwards the page to othersite.com?viewmovie=15052&tempid=10101505050550505&autostart=0

I need to get the address into my php page, but I dont know where to start with this.

I need to then break up the variables, I could probably do that with explode, but everytime I go to the forward page it will change the viewmovie variables, so I gotta make it dynamicly break up the variables on the spot.

Carrying Variables Over To Another Page
I have been having problems with a page that pulls data from a mysql database, then allows a user to fill in extra data. The whole lot must then be carried over to the same page using a switching variable (here called $export), where it will be placed in a tab delimited file and saved.

The problem I have been having is that the page will not carry over the variables, and I am reluctant to use a html form, as I cannot have multiple results like the mysql_fetch_array function can (expecting >10 results). Code:

Sending Variables To Another Page Through Hyperlinks
I have hyperlinks directing to a page with a form to fill ( that page is called main_form.php). I want to be able to send a variable through the click of the hyperlink to 'main_form.php'.How do I do this?

Pass Upload Page Variables
As I sure will become obvious with the asking of this question, I am new to
programing....

I have copied and pasted my way to a successful file upload page and have
built some rather ugly if elseif loops that read the file and extract the
needed data from it. While the data is being parsed from the uploaded file
a string variable is being built that holds some details of the process.
All of this happens when the user clicks the upload button on the form. Now
when all this code is finished running, I ASSUME the page reloads, because
my string variable seems to be empty. So, my question is how do I keep this
variable so that I can print it to the form when the process is finished?

Passing More Than One Word Variables To Php Page
i wrote a search page for my site (searching through a mysql database) but
when i type in more than one word (eg "item three") in the search field it
gets passed to the page as a single word ("item"). Are there any
workarounds for this? the code is below.( houseproudlancs.co.uk/search.php
)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<!-- background="./images/background.jpg" --> <body bgcolor="#640000">
<?php
$search_for = $_GET['for'];
$search_category = $_GET['category']; global $search_for;
global $search_category;
global $the_items_description;
global $does_contain_text;
?>

<div align=center>
<form action="http://www.houseproudlancs.co.uk/search.php"
method="GET"> <br><table bgcolor="#EBEB96" cellpadding=6>
<tr> <td> </td> </tr> <tr> <td> <div align=center> Search For:
</div></td> <td> <div align=center> Category: </div> </td> </tr>
<tr> <td>
<INPUT name=for value=<?php echo ("$search_for"); ?>>
</td> <td>
<SELECT NAME=category SIZE=1>
<OPTION <?php if ($search_category == "Search All
Categories") { echo ("SELECTED"); } ?>>Search All Categories
<OPTION <?php if ($search_category == "Floral Creations") {
echo ("SELECTED"); }?>>Floral Creations <OPTION <?php if
($search_category == "Decorative Lighting") { echo
("SELECTED"); }?>>Decorative Lighting <OPTION <?php if
($search_category == "Kitchenware & Crockery") { echo
("SELECTED"); }?>>Kitchenware & Crockery <OPTION <?php if
($search_category == "Fancy Goods & Furniture") { echo
("SELECTED"); }?>>Fancy Goods & Furniture
</SELECT>
</td> <td>
<INPUT TYPE=submit VALUE="Search">
</td>
</form>
<tr> <td> </td> </tr>
</table>
</div>

Presevre Php Variables From Login From To Every Page
I have a login.php form. How do I allow that data on the login.php
form accessible to every page in my applicaton?

Login.php goes to Auth.php. In Auth.php, i can access the username and
password using the $_POST['user'] no problem. But how can I pass the
data that AUTH.php got from the LOGIN.php via a POST call to other
pages?

For instance, login.php passes data to auth.php via a form post. In
auth.php, how do i pass data to other php pages that it got?

in AUTH.php
I can do a header("Location: home.php?login=".$_POST['user'});
However, this will show the login name and password which is unsecure.

Session Variables Work On One Page But Not Another
I am working on what I suppose I could call a data entry form. The client is a book store and they want to be able to enter books and have some fields maintain their values after clicking the submit button. For example if they have multiple books of the genre 'Mystery' they want this dropdown menu to remain selected on 'Mystery' after they click submit. 

I have been able to get this to work EXCEPT the client also has the option of entering the ISBN number of a book in a 'lookup' text field, clicking a button called 'lookup' and the information is retrieved from a public book database.  This is where I have the problem with the session variables.  The first php form they reach (when logging in) is called 'addbook.php'. 

This form is blank and if they enter all of the information and click 'Submit' the information in fields with an (*) are maintained when they are returned to the form.  However, if they use the 'lookup' field they are sent to a similar form called addbook_lookup.php which has an 'include' (xmlparser_rc2.php) that looks up the data from the public database and then fills in the form with that data. 

It is here that any variables that they input from the prior page should also be maintain, however, I believe the xmlparser_rc2.php script is overwriting the session variables for those fields designated with the (*). I am not sure what to do. Code:

Forward To Page Alongwith Variables In POST
How to forward a page to another page alongwith the parameters passed into it

I mean I have page a.php
which is called with some parameters in $_POST and I require to pass these to another page with same variables in $_POST

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 ##################################

Passing Variables In Frame Page By Post Method
Is it possible to send  variables by post method through a submit button to a frames page, and have all 3 pages in the frame pick up the variable using the $_request[var] ?In other words, I click on a submit button. in form action method call index.php the index page has a top, main, and a left frame.how do i get each one of those to receive the variable, when i can only sendit to one page? or is it possible to send it to more than one page, but only action to one page?

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.

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?

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:

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?

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?


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