RE: [PHP-DB] processing status page help
or perhaps more comprehensively http://www.mysite.com/newpage.php";> please wait. ') //start the processing here do this; do that; do the other ; ?> should work but I am not absolutly sure - try it and see... Peter -Original Message- From: Brendon [mailto:[EMAIL PROTECTED]] Sent: 15 February 2003 22:14 To: [EMAIL PROTECTED] Subject: [PHP-DB] processing status page help Hello, How can I create a page that notifies the user their request is being processed after they click a submit button? For example, they type in some information, the page then says "Your request is processing..." Maybe a few animated ... 's for eyecandy, and then once the process is completed, they get directed to a desired page. Regards, Brendon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] processing status page help
http://www.mysite.com/newpage.php";> please wait. should work - the 10 is the delay Peter -Original Message- From: Brendon [mailto:[EMAIL PROTECTED]] Sent: 15 February 2003 22:14 To: [EMAIL PROTECTED] Subject: [PHP-DB] processing status page help Hello, How can I create a page that notifies the user their request is being processed after they click a submit button? For example, they type in some information, the page then says "Your request is processing..." Maybe a few animated ... 's for eyecandy, and then once the process is completed, they get directed to a desired page. Regards, Brendon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: while loop help
[EMAIL PROTECTED] (Peter Gumbrell) writes: > if (isset($_POST['workshop_select'])) > { > print $header_string; > $user = $HTTP_POST_VARS['username']; > > * this is the section that needs some sort of loop if(isset($HTTP_POST_VARS['rank']) && is_array($HTTP_POST_VARS['rank'])){ foreach($HTTP_POST_VARS['rank'] as $rank){ $r = substr($rank, -1); ereg ('^[A-Za-z]*([0-9]+)-', $rank, $matches); $workshop_ID = $matches[1]; if($r > 0) mysql_query=("INSERT INTO choices(user_id, workshop_ID, rank) ". "VALUES ($user, $workshop_ID, $r)"); } } > * > } I guess the above code would do what you want. I can't see what the 'WHERE $rank > 0' part in an INSERT query would be good for or how it could be allowed, but there might be something I'm not aware of here (not sure what you want to accomplish, but I guess an if test would be right). Also, I presume you want '[0-9]+' in the regexp, but I never use the ereg functions, so I'm not sure about the syntax. You definitely want to look up the ereg function (http://www.php.net/manual/en/function.ereg.php) as it only returns an int, not a match. I have NOT tested the above code. -- --Fredrik "Why be a man when you can be a success?" -- Bertold Brecht -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] while loop help
I would appreciate some help with the following code. I have presented a user with a table of session workshops for a conference. There is a select list called "rank", and the value is the workshop letter and number with the user's ranking, e.g. "B12-1 B12-2, B12-3" for each workshop. The following code is triggered by the submit button on that layout: if (isset($_POST['workshop_select'])) { print $header_string; $user = $HTTP_POST_VARS['username']; * this is the section that needs some sort of loop $rank_all = $HTTP_POST_VARS['rank']; $rank = substr($rank_all, -1); $workshop_ID = (ereg ('[0-9]-', $rank_all)); mysql_query=("INSERT INTO choices(user_id, workshop_ID, rank) VALUES ($user, $workshop_ID, $rank) WHERE $rank >0"); * } The above code needs to retrieve the ranked workshops. I am assuming that there needs to be some sort of for and/or while loop, but I am unsure what the syntax needs to be. In other words, I would like the code to read the table records one by one, inserting the $user, $workshop_ID and $rank for each (where the user has selected that workshop). Many thanks Peter Gumbrell -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] processing status page help
Hello, How can I create a page that notifies the user their request is being processed after they click a submit button? For example, they type in some information, the page then says "Your request is processing..." Maybe a few animated ... 's for eyecandy, and then once the process is completed, they get directed to a desired page. Regards, Brendon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: printing repeat table headers
[EMAIL PROTECTED] (Sam Folk-Williams) writes: > ...What I would like to do is have those headers repeat every 33 > rows... > $tableHeaders = "..."; $cnt = 0; > while ($row = mysql_fetch_array($result)) { // stuff if($cnt%33 == 0){ echo $tableHeaders; } $cnt++; > echo "$tableContent"; > } //close while loop -- --Fredrik A mathematician is a machine for converting coffee into theorems. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] printing repeat table headers
Hi, I'm printing the results of a DB query that gets a 300 row staff directory. All 300 rows appear on one page. The top of the HTML table has basic headers like "First Name, Last Name, Email" etc, then all 300 rows print underneath the headers. What I would like to do is have those headers repeat every 33 rows, so that as the user scrolls down that can still see the table headers every so often. I feel like this should be easy, but it's giving me a hard time. Any suggestions? My code is below. Thanks, Sam $tableHeaders = " Staff Name Office Location Primary Telephone Ext Email Direct Telephone Cell/Pager "; echo ""; echo "$tableHeaders"; while ($row = mysql_fetch_array($result)) { $count = count($result); $staff_id = $row['staff_id']; $staff_fname = $row['staff_fname']; $office_name = $row['office_name']; $staff_lname = $row['staff_lname']; $staff_phone = $row['staff_phone']; $staff_phone2 = $row['staff_phone2']; $staff_email = $row['staff_email']; $office_phone = $row['office_phone']; $ext = $row['ext']; //strip slashes from textfields $staff_fname = stripslashes($staff_fname); $staff_lname = stripslashes($staff_lname); $office_name = stripslashes($office_name); $tableContent = " $staff_lname, $staff_fname $office_name $office_phone $ext $staff_email $staff_phone $staff_phone2 "; echo "$tableContent"; } //close while loop echo " "; -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: php & date manupulation functions
[EMAIL PROTECTED] (Rajesh Fowkar) writes: > Now while updating the form I want to retrieve the date and take out day, > month and year from that date and display the correct selection in the > combo. I could not find any function like say > > day($dbdate); > month($dbdate); > year($dbdate); > > Am I missing something ? Is there anyway to accomplish the above ? or I > will have to store these three values separatly in the database rather than > as a date. Well, there is actually a quite good support for manipulating strings in php. Have a look at the format of your date variable, and use either the regexp functions or string functions like split and explode. Let's say your date is in a format like '-MM-DD hh:mm:ss'. Then somehing like list($yy, $mon, $dd, $hh, $min, $ss) = split(" |:|-", $date); would do the trick. -- --Fredrik A mathematician is a machine for converting coffee into theorems. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] php & date manupulation functions
Hello, There seems to be very few date manupulation functions in php. In my php form I am displaying select combos for day, month and year. Now while updating the form I want to retrieve the date and take out day, month and year from that date and display the correct selection in the combo. I could not find any function like say day($dbdate); month($dbdate); year($dbdate); Am I missing something ? Is there anyway to accomplish the above ? or I will have to store these three values separatly in the database rather than as a date. Thanks in advance. Peace -- Rajesh * [EMAIL PROTECTED] * http://www.symonds.net/~rajesh/ Powered By : Debian GNU/Linux 3.0 (Woody) - [Kernel 2.4.18(ext3),Mutt 1.5.1i] Women are always anxious to urge bachelors to matrimony; is it from charity, or revenge? -- Gustave Vapereau -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] How to produce the report using PHP?
Hi there, I want to produce the report using the PHP but I don't know the PHP command. Or is it any third party software that can be called by PHP to produce the report? Is it anybody out there can help me. Rgds, Rokasa// -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php