[PHP] Header Location redirection parameters fail to redirect
I want url mysite.no to redirect to mysite.com with parameters lang=no and ctry=no, but the parameters do not follow the redirection. mysite.no/index.php is ? Header ('Location: http://mysite.com/index.php?lang=noctry=no' ) ; exit; ? mysite.com/index.php is ? echo h3mysite.com Homepage /h3 ; $lang = $_REQUEST['lang']; $ctry = $_REQUEST['ctry']; echo Country= $ctry br Language= $lang; ? When I browse mysite.no mysite.com homepage is shown with lang and ctry as blank When I browse mysite.com/index.php?lang=noctry=no parameters lang and ctry are set to no as I wish I have the server on my own laptop where I also do the browsing. I use PHP 4.2.2 I kindly got some answers yesterday that do not seem to solv the question so I have made myself more specific. Do anyone have a clue why the parameters are stripped from the redirection? (I am not very trained, but as far as I know the parameters should be redirected??!!) Thanks Olav -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Time calculation after UNIX
Hi I have a database that is supposed to last more than 30 years Could someone advice me how to calculate (add and subtract) time in a maner that willl be correct after 2030 when Unix Time stop working? ragards [EMAIL PROTECTED] -- 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] query works in mysql, but not from php
Hi $sql = SELECT user FROM persons WHERE user = '$firstName' and domain = '$domainName' ; ; $result = mysql_query($sql,$connection ) or die(mysql_error()); Calling above lines from php returns: You have an error in SQL syntax near ';' at line 1 Issuing the command SELECT user FROM persons WHERE user = 'fred' AND domain = 'company.net' ; in mysql give a proper result. Can anyone explain what might be causing the error??? regards Olav -- 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] Transfer variable to next web-page
I just started.. How do you transfer a variable from one web-page to another I try to use a form like this: ? echo(P FORM method='POST' action='join2.php' text for button INPUT type='submit' value='Next step' INPUT type='hidden' name='htmlVariableName' value='$phpVariableName' /FORM ); ? and catch it injoin2.phpby: $phpVariableName=htmlVariableName; echo$phpVariableName; This do not work. Can anyone tel me what should be done Neither books, php-manual nor HTML-specification does tel me. Olav -- 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] How to get mysql-result into a php variable
This is perhaps elementary, but I cannot find solution in the documentation I want to transfer to a php variable wheter I find a matching firstname in a group from mysql db function lookupFirstname ($fname, $gr, $conection) { $sql = SELECT firstname AS matches ; $sql .= FROM persons ; $sql .= WHERE firstname = '$fname' AND group='$gr';; if (!$sql_result = mysql_query($sql,$connection) ) {echo Pquery: ; echo mysql_error(); } $store = mysql_store_result($conn); $result = mysql_num_rows($store); IF ($result 0) {return 'match' ;} ELSE {return 'nomatch';} } I get error message that funcion mysql_stor_result() is not defined How shall I use thees two funcions? Thank you Olav -- 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]