[PHP] Problems Retrieving Session Variables on 2nd submit.
Hello folks, I'm wondering if anyone has experienced this before. I'm trying to get sessions working for a small utility site I've developed. I'm using PHP Vers 4.0.2 (I know its an oldie but I don't know how to update it without crashing my entire server) on a Cobalt RAQ3 (RedHat Linux). The url (if you're curious) is http://www.amazon-networks.com/bms The steps: 1. Someone goes to the homepage selects a name from the drop-down and hits 'Submit'. 2. The form on the homepage calls my main script (decide.php). 3. The decide.php script generates an instructions page and places the person's $name and $department on the generated page (This Works). 4. Once the person reads the instructions they are told to hit the 'Proceed' button and when they click 'Proceed,'this action (again) calls the decide.php page (the very same script that created this page). 5. What happens next is another page is created by the decide.php script and displayed but the $name and $department fields have now lost their value (even though they worked in Step #3 above). If this is confusing you can see how it works at: http://www.amazon-networks.com/bms Below is how the decide.php script registers the variables. ? session_start(); // Below I'm setting up the Date and Expiration variables. // Below I'm setting up the Date and Expiration variables. // Below I'm setting up the Date and Expiration variables. $expire = date(D, d M Y, mktime(0,0,0,date(n),date(d)+14,date(Y))); $date = date(D, d M Y, mktime(0,0,0,date(n),date(d),date(Y))); header (Expires: .$expire. 05:00:00 GMT); //header (Expires: Mon, 26 Jul 2010 05:00:00 GMT); // Below I'm registering all of the varibles that I will use for this application. // Below I'm registering all of the varibles that I will use for this application. // Below I'm registering all of the varibles that I will use for this application. if (!$phpsessid) { session_register($employee); session_register($employee_f_name); session_register($employee_l_name); session_register($employee_full_name); session_register($department); session_register($date); session_register($expire); session_register($col1); session_register($col2); session_register($col3); session_register($col4); session_register($col5); session_register($col6); session_register($row1); session_register($row2); session_register($row3); session_register($row4); session_register($row5); session_register($row6); session_register($row_1_title); session_register($row_2_title); session_register($row_3_title); session_register($row_4_title); session_register($row_5_title); session_register($row_6_title); session_register($where_from); } ? Any suggestions anyone can offer will be greatly appreciated. Thank You, Mario A. Salinas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] '--enable-track-vars' php.ini file on Mac OS X
Hi Folks, Let me begin with the direct question to save you time. If you want more info read more about the issue by reading 'The Problem:' below. The question: Is there any way to '--enable-track-vars' in my Macintosh laptop running Mac OS-X 10.1.5 and a version 4.2.1 installation of PHP without creating a php.ini file? Is there a command I can run to do this? If so... What directory do I need to be in when I do this? Configuration Info: Mac OS X PHP Version 4.2.1 The problem: I have a PHP application which works fine on a Cobalt server that is running PHP 4.0.2. My problem is that I'm trying to run this application (a set of PHP scripts) on my Macintosh laptop which is running Mac OS X 10.1.5. I have tested the PHP installation using the phpinfo() function on my laptop and it works fine. But my scripts require the tracking of variables. By running the phpinfo() function on both my laptop (PHP v. 4.2.1 this does not run my scripts) and the cobalt server (PHP v. 4.0.2 this does run my scripts) I noticed that there was some difference in the configuration. I noticed that my laptop configuration does not have '--enable-track-vars' listed under the Configure Command information in the PHP configuration page that results from running the phpinfo() function but the Cobalt PHP installation does have that listed. The installation of PHP I used was obtained from: http://www.entropy.ch/software/macosx/php/ This page says that this installation package does not include a php.ini file and it goes on to say that, if I want this file I should just create it. But it does not say what should go into this php.ini file. I suppose I could just copy the php.ini file from the Cobalt server running PHP v. 4.0.2 but I think that won't work. Any ideas? Thanks in advance, Mario Salinas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trouble creating a list on months
Hello everyone, This is my first posting. I'm hoping someone can help figure this out. I'm using a GNU licensed calendar but there is a bug in it's process for building a list of months. The list is supposed to build a list of months starting with the current month and adding 11 months to the list. In theory, If this is July the select should be as follows: select optionJuly/option optionAugust/option optionSeptember/option optionOctober/option optionNovember/option optionDecember/option optionJanuary/option optionFebrurary/option optionMarch/option optionApril/option optionMay/option optionJune/option /select The process of building this list is done in a defined function in a 'Required' inclusion of a file. The problem is that the list gets built as follows: select optionJuly/option optionAugust/option optionOctober/option optionOctober/option optionDecember/option optionDecember/option optionJanuary/option optionMarch/option optionMarch/option optionMay/option optionMay/option optionJuly/option /select The function gets called as follows: ? month_select($month); ? $month is defined just before the (above) call as follows: if(!isset($month)) $month=date(n); The actual function is as follows: function month_select($default=1) { $offset = date(n)-1; // value used to be 'm' echo (select name=month style=\font-family:Verdana,Helvetica;font-size:8pt;\); for($x=1;$x=12;$x++) { $month = $x + $offset; if($month12) $month -= 12; echo(option value=$month); if($month==$default) echo( selected); echo(.date(F,mktime(0,0,0,$month))./option); } echo (/select); } Any Ideas what could be causing the problem? I'm new to this and have been staring at it for a while. Your help is greatly appreciated. Thanks in advance, Mario Salinas -- === The Internet is a Jungle... We can guide you through it safely! === Amazon Networks 1-818/954-0131 mailto:[EMAIL PROTECTED] http://www.amazon-networks.com === A firm that specializes in enabling large and small companies to Dominate the Internet through the development of intelligent Intranet/Extranet solutions and Search Engine Registrations. === It's because light travels faster than sound that some people seem very bright, until you hear them speak -- Anonymous === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] I'm Looking for a PHP Tutor in Los Angeles.
Hello, I'm new to this list (today, as a matter of fact). Normally I would lurk awhile to get a feel for the list etiquette but feel the pressure to learn PHP quickly. I want to apologize, in advance, if I'm committing any list sins. I am looking to find a someone who is well versed in PHP that would consider tutoring someone in the Los Angeles area. I am really looking for someone in this area so that we can work face to face. I have several years experience programming other languages but am having trouble with sessions in PHP (amongst other things). I can be flexible with my time to accommodate your schedule. If you are interested, please email me with some information about your experience, some contact info and a best time to call. Thank you in advance for your responses. Sincerely, Mario A. Salinas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]