[PHP] Would like to join list...
Can anyone email me directly and tell me how to subscribe to this list? Thanks, Steve Osborne Database Programmer Chinook Multimedia Inc. [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] in_array error
Can anyone explain why I am getting the following error? Fatal error: Call to unsupported or undefined function in_array() in includes/chinlib21stCentury.inc on line 3131 Code: if( (is_array($List)) AND (is_array($RemoveList)) ) { $ListItems = count($List); sort($List); for($ListItem=0; $ListItem < $ListItems; $ListItem++) { //printf("List value: $List[$ListItem]\n"); if(!(in_array($List[$ListItem],$RemoveList)) AND (trim($List[$ListItem]) <> "") ) // Line 3131 $diff[] = $List[$ListItem]; } }elseif($debugit){ echo "In function ListDiff List and RemoveList are NOT arrays"; } return ($diff); Thanks, Steve Osborne Database Programmer Chinook Multimedia Inc. -- 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]
Re: [PHP] in_array error
I'm using php 4 on my machine, however the server that I am testing on only supports php3 - Original Message - From: "Gerard Onorato" <[EMAIL PROTECTED]> To: "Steve Osborne" <[EMAIL PROTECTED]>; "PHP-General (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, November 29, 2001 11:29 AM Subject: RE: [PHP] in_array error > Steve, > > What version of PHP are you running. in_array is >= 4.0. is_array was in 3.0 > so this may be an issue for you. > > Gerard > > -Original Message- > From: Steve Osborne [mailto:[EMAIL PROTECTED]] > Sent: Thursday, November 29, 2001 3:08 PM > To: PHP-General (E-mail) > Subject: [PHP] in_array error > > > Can anyone explain why I am getting the following error? > > Fatal error: Call to unsupported or undefined function in_array() in > includes/chinlib21stCentury.inc on line 3131 > > > Code: > if( (is_array($List)) AND (is_array($RemoveList)) ) > { > $ListItems = count($List); > sort($List); > for($ListItem=0; $ListItem < $ListItems; $ListItem++) > { >//printf("List value: $List[$ListItem]\n"); >if(!(in_array($List[$ListItem],$RemoveList)) AND (trim($List[$ListItem]) > <> "") ) // Line 3131 > $diff[] = $List[$ListItem]; > } > }elseif($debugit){ > echo "In function ListDiff List and RemoveList are NOT arrays"; > } > return ($diff); > > > Thanks, > > Steve Osborne > Database Programmer > Chinook Multimedia Inc. > > > > -- > 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 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] Setting Cookies
I am attempting to use the SetCookie command. I receive the following error: Warning: Cannot add header information - headers already sent by (reference to current page)... At this point I have authenticated the user, and am trying to set the cookie before redirecting them to the registered users section. Should I be setting the cookie on the top of the page that I am sending them to? Any comments or suggestions would be greatly appreciated. Steve Osborne [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] Redirect function
Is there a function or command in php that will redirect a user to another page, similar to Response.Redirect(URL) in ASP? Steve Osborne Database Programmer Chinook Multimedia Inc. [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] Cookie Retrieval
Can someone tell me if there is a bit of code I need to put on pages so I can retrieve a cookie. The cookie was set with the following code: //(D) Set Cookie $encoded_login = encode_string($login); if ( $remember == "yes" ){ // set login to expire in 1000 days $time = (time() + ( 24 * 3600 * 365 )); SetCookie ( "poccd_session", $encoded_login, $time); }else{ SetCookie ( "poccd_session", $encoded_login ); } I am trying to retrieve it with the following code (for testing purposes only, right now): if($poccd_session) { header("location: index.php"); }else{ print("The cookie plan didn't work."); } Any suggestions would be appreciated. Steve Osborne Database Programmer Chinook Multimedia Inc. [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] Cookie
Still trying to get the cookie to work in my site for automatic login capabilities. It has it's moments of greatness, before fading into the shadows again. Most recently, I downloaded Netscape 6.2.1 to test my site, and when I did not allow the password manager to save my login, it has since refused to allow my cookie to be set, even when I unblocked cookies for the site in the Netscape preferences. So, in light of that, I tried to set the cookie on a page in the directory above the login page, in hopes that I could get around the Netscape problem, and, of course, this stopped IE 6 from reading the cookie. Now, neither browser is working correctly. I am already resigned to the fact that I will not try to support users of versions 4 and below in regards to cookies, however I do need to get the more recent versions working. Is it true that when you set a cookie, it is valid only in that directory or domain? Will it be retrieved in subfolders of that directory? Do I require special code to allow it to be accessed in subfolders? Steve Osborne Database Programmer Chinook Multimedia Inc. [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] Passing Variables
Can someone tell me how to pass a variable in the url? I am using a form and calling a handler file as its action, as in: I've also tried single quotes around the variable $login, as in: Anyone have any suggestions? Cheers, Steve Osborne Database Programmer Chinook Multimedia Inc. [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]
Re: [PHP] Passing Variables-SOLVED
Thanks for the advice... just had to remember that the variable had to be in php tags, as in: Thanks for the help, problem solved. Steve. -- 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] Displaying html
Does anyone know of an easy way to store html code in a mysql database, and then retreive it, in such a way that it can display the page as if it were a standard html page? Would using php be of benefit to me? Steve Osborne [EMAIL PROTECTED] * *(borrowed from Paul) -- 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] Re: Returning html code-PROB SOLVED
> Does anyone know of an easy way to store html code in a mysql database, and > then retreive it, in such a way that it can display the page as if it were a > standard html page? Would using php be of benefit to me? Figured it out. I completely forgot about two php functions that escape problem characters in databases and unescape them when retrieved. Problem solved. Steve Osborne [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]
Re: [PHP] Working with designers...
As a designer and a coder, I have always found that it is easiest to have the layout of the page done before adding the dynamic content. If the layout is done correctly, it should not be necessary to put in sample data that has to be removed after. After joining the workforce, as a database programmer, I now strictly code the backend stuff, and as before, the layouts are done and I simply add the dynamic content. Whatever arrangement you end up with, just make sure the ground rules are in place before you start. It may help to have them written down (I know, coders hate to document), as it will protect you in the future if problems do arise. Good luck, Steve Osborne Database Programmer Chinook Multimedia Inc. [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]