Lost Variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First -- thank you for reading my post.

I am using the general strategy suggested by Jay (thanks, Jay) to process my
form in another procedure.  It's listed below.  In my processStuff.php
program, I use the following code:

$attributes = array();
$attributes = array_merge($attributes,$HTTP_POST_VARS, $HTTP_GET_VARS);
extract($attributes, EXTR_PREFIX_SAME, "this");

I want to load my numerous post variables into regular memory variables (or
whatever the php nomenclature is) -- e.g. $_POST['action'] becomes $action.
It doesn't seem to working according to the manual.  I list my
$HTTP_SESSION_VARS, there are none.

I would appreciate anyone taking the time to explain to me how this works.
Either it's stupid or I'm stupid.  I'm figuring it's me.

Monique.




<form method="post" name="form1" action="processStuff.php">
<input type="submit" name="action" value="Add Record">
<input type="submit" name="action" value="Delete Record">

In processStuff.php

<?php
switch ($_POST['action']){
case "Add Record":
...do stuff...
..redirect back to original page...
break;

case "Delete Record":
...do stuff...
..redirect back to original page...
break;

}
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux