Fw: [PHP] Help please: Unable to get $_POST["variable"]; to work in a form.
Try $_POST['name'] and $_POST['age'] Try $HTTP_POST_VARS['name'] and $HTTP_POST_VARS['age'] - Original Message - From: "David Scott" <[EMAIL PROTECTED]> To: <> Sent: Tuesday, December 10, 2002 10:56 AM Subject: [PHP] Help please: Unable to get $_POST["variable"]; to work in a form. I am going through the introductory tutorial on http://www.php.net/ and am stuck on this page: http://www.php.net/manual/en/tutorial.forms.php I have been able to get all of the examples up to this point to work. The form is simple: it asks for a text "name", a text "age" and has a submit button. The information is submitted to action.php. Action.php contains this code: Hi . You are years old. I saved action.php as a text file with only the information above. When I enter JoeBob into the name field and 27 into the age field, I get this for output: Hi Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1 . You are Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2 years old. What can I do to remedy this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form.
What version of PHP are you using? I believe that anything earlier than 4.05 does not support $_POST. Did you try $HTTP_POST_VARS['name']? This will work, regardless of version. - Original Message - From: "David Scott" <[EMAIL PROTECTED]> To: <> Sent: Tuesday, December 10, 2002 12:54 PM Subject: Re: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form. I have corrected the typo and had hoped this was a simple solution, yet $_POST still doesn't work. Any ideas? "Craig Thomas" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Using $_REQUEST[""] works because the vars are in the http request, but > $_POST[""] contains nothing as the other poster noted: mehtod="post" > > >>-Original Message- > >>From: David Scott [mailto:[EMAIL PROTECTED]] > >>Sent: Tuesday, December 10, 2002 1:20 PM > >>To: [EMAIL PROTECTED] > >>Subject: [PHP] Re: Help please: Unable to get $_POST["variable"]; to > >>work in a form. > >> > >> > >>Using $_REQUEST["variable"] causes the script to work. > >>Why is this? And, why can I not use $_POST? > >> > >>"David Scott" <[EMAIL PROTECTED]> wrote in message > >>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >>> I am going through the introductory tutorial on > >>http://www.php.net/ and am > >>> stuck on this page: > >>> http://www.php.net/manual/en/tutorial.forms.php > >>> > >>> I have been able to get all of the examples up to this point to work. > >>> > >>> The form is simple: it asks for a text "name", a text "age" and has a > >>submit > >>> button. The information is submitted to action.php. > >>> > >>> Action.php contains this code: > >>> Hi . > >>> You are years old. > >>> > >>> I saved action.php as a text file with only the information above. > >>> > >>> When I enter JoeBob into the name field and 27 into the age field, I get > >>> this for output: > >>> Hi > >>> Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1 > >>> . You are > >>> Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2 > >>> years old. > >>> > >>> What can I do to remedy this? > >>> > >>> > >> > >> > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form.
First, please respond to the list, not me. Second, I'm not asking the question, David Scott is. Third, I don't use " " either; I use ' ' - Original Message - From: "Victor" <[EMAIL PROTECTED]> To: "'Rick Emery'" <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 1:49 PM Subject: RE: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form. Why are you using $_POST[""]? I thought you had to use $_POST['']. I always use '' instead of "" and it always works. Is it just me? Can one really use double quotes? -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 2:05 PM To: Subject: Fw: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form. What version of PHP are you using? I believe that anything earlier than 4.05 does not support $_POST. Did you try $HTTP_POST_VARS['name']? This will work, regardless of version. - Original Message - From: "David Scott" <[EMAIL PROTECTED]> To: <> Sent: Tuesday, December 10, 2002 12:54 PM Subject: Re: [PHP] Re: Help please: Unable to get $_POST["variable"]; to work in a form. I have corrected the typo and had hoped this was a simple solution, yet $_POST still doesn't work. Any ideas? "Craig Thomas" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Using $_REQUEST[""] works because the vars are in the http request, but > $_POST[""] contains nothing as the other poster noted: mehtod="post" > > >>-Original Message- > >>From: David Scott [mailto:[EMAIL PROTECTED]] > >>Sent: Tuesday, December 10, 2002 1:20 PM > >>To: [EMAIL PROTECTED] > >>Subject: [PHP] Re: Help please: Unable to get $_POST["variable"]; to > >>work in a form. > >> > >> > >>Using $_REQUEST["variable"] causes the script to work. > >>Why is this? And, why can I not use $_POST? > >> > >>"David Scott" <[EMAIL PROTECTED]> wrote in message > >>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > >>> I am going through the introductory tutorial on > >>http://www.php.net/ and am > >>> stuck on this page: > >>> http://www.php.net/manual/en/tutorial.forms.php > >>> > >>> I have been able to get all of the examples up to this point to work. > >>> > >>> The form is simple: it asks for a text "name", a text "age" and has a > >>submit > >>> button. The information is submitted to action.php. > >>> > >>> Action.php contains this code: > >>> Hi . > >>> You are years old. > >>> > >>> I saved action.php as a text file with only the information above. > >>> > >>> When I enter JoeBob into the name field and 27 into the age field, I get > >>> this for output: > >>> Hi > >>> Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1 > >>> . You are > >>> Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2 > >>> years old. > >>> > >>> What can I do to remedy this? > >>> > >>> > >> > >> > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values
Hey Aggie, Show us the rst of the code. stristr() should not be a problem. Chances are there's a blank line elsewhere that's being sent. - Original Message - From: "KANM MD" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 2:34 PM Subject: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values Here's my question: I'm running code that essentially checks for either a certain IP address or a password before it sends a cookie. However, when I try to send the cookie, I get the standard "Error - headers already sent" when I haven't output anything. After some spot debugging, I found that if ( stristr($HTTP_SERVER_VARS["remote_address"],"XXX.YYY.ZZZ") ) { ... essentially counts as a sent header. I imagine this has to do with the fact that stristr returns a TRUE or FALSE value, but not being an expert in programming concepts, I wouldn't know. Anywho, if anyone knows a workaround for this or could explain the problem that lies within, it would be greatly appreciated. Thanks, Kyle Hale Computer Guy KANM Student Radio Texas A&M University -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values
If you want our help, we need to see all the code, not just the code that YOU think is relevant. What you've shown us is useless for diagnosing your problem. Show the EXACT code, not a "simple" "secure", "readable" version. Just remove passwords. - Original Message - From: "KANM MD" <[EMAIL PROTECTED]> To: "Rick Emery" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, December 11, 2002 2:54 AM Subject: Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values Here is the code in a readable form (alterations for security, simplicity ...) if ((stristr($HTTP_SERVER_VARS["remote_address"],"XXX.YYY.ZZZ"))||($pwprotect== 'password')) { setcookie("pwprotect2","1",time()+300); } else { echo "(ASK FOR PASSWORD)"; } Now when you say "blank line" does that mean actual empty lines between the To: "KANM MD" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 10:39 PM Subject: Re: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values > Hey Aggie, > > Show us the rst of the code. stristr() should not be a problem. Chances are there's a > blank line elsewhere that's being sent. > > - Original Message - > From: "KANM MD" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, December 10, 2002 2:34 PM > Subject: [PHP] Question Regarding Cookies, Sent Headers, and Functions That Return Values > > > Here's my question: > > I'm running code that essentially checks for either a certain IP address or a password > before it sends a cookie. However, when I try to send the cookie, I get the standard > "Error - headers already sent" when I haven't output anything. After some spot debugging, > I found that > > if ( stristr($HTTP_SERVER_VARS["remote_address"],"XXX.YYY.ZZZ") ) { ... > > essentially counts as a sent header. I imagine this has to do with the fact that stristr > returns a TRUE or FALSE value, but not being an expert in programming concepts, I wouldn't > know. > > Anywho, if anyone knows a workaround for this or could explain the problem that lies > within, it would be greatly appreciated. > > Thanks, > > Kyle Hale > Computer Guy > KANM Student Radio > Texas A&M University > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Add column to table
First, you've asked the wron list; ask the mysql list Second: ALTER mytable ADD COLUMN new column INT UNSIGNED AFTER old_column; - Original Message - From: "Shaun" <[EMAIL PROTECTED]> To: <> Sent: Wednesday, December 11, 2002 8:25 AM Subject: [PHP] Add column to table Hi, please could someone tell me what the sql command is to add a colummn to a table? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] upload image
If it is a GIF file, the header format is: Byte # 0 - 2 GIF 3 - 5 87a or 89a 6 - 7 Width (in pixels) 8 - 9 Height (in pixels) Be advised, the dimensions are in reverse major order; that is, 50 pixels is represented as "32 00" - Original Message - From: "Shaun" <[EMAIL PROTECTED]> To: <> Sent: Wednesday, December 11, 2002 8:23 AM Subject: [PHP] upload image Hi, i am using a form to upload an image to the server, is it possible to get the image size during this process so i can store it for later use (i.e. determining the size of the popup window to view the image)? thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Free MySQL Hosting...again
The page would not display for me. It did, however send the following HTML. Please note that the "?PHPSESSID" is not enclosed in delimiters. Also, PHPSESSID needs to be $PHPSESSID. Could that be the problem? Finally, dump the FRAMES. Free MySQL Hosting Free MySQL Hosting - NukedWeb is offering free MySQL hosting. - free,mysql,hosting ." - Original Message - From: Adam Voigt To: PHP Mailing List Cc: [EMAIL PROTECTED] Sent: Thursday, December 12, 2002 7:59 AM Subject: Re: [PHP] Free MySQL Hosting...again I'm getting Connection Refused on that website, sure your not still having problems? On Wed, 2002-12-11 at 15:33, PHP Mailing List wrote: I had a little trouble with my cable modem before, but the Free MySQL Hosting is back up if any of you are interested. =) http://mysql.nukedweb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt ([EMAIL PROTECTED]) The Cryptocomm Group My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Date Formatting
MYSQL will do all the formatting that you need. Look up sect 6.3.4, "Date and Time Functions" in mysql manual. Look at the DATE_FORMAT(date,format) command - Original Message - From: "Clint Tredway" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 13, 2002 11:55 AM Subject: [PHP] Date Formatting How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot figure it out. Thanks, Clint -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex Help
addslashes() - Original Message - From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 11:26 AM Subject: [PHP] Regex Help Could someone show me how to use preg_replace to change this: test test test into: anotherword test anotherword basically, I want to change a value only if it is not in an option tag. I also want to account for situations like : test, something test test! My thoughts were to do the replace if the word (test) was not surrounded by quotes or surrounded by greater/less than symbols. I just have no idea how to formulate that with regex. Please help! Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex Help
test test"; ereg("(.*)()(.*)",$q,$ar); $t = "anotherword".$ar[2]."anotherword"; print $t; ?> outputs: anotherwordtestanotherword - Original Message - From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 11:55 AM Subject: Re: [PHP] Regex Help I'm sorry, I accidentally left the slashes on my second example. My original message should read: Could someone show me how to use preg_replace to change this: test test test into: anotherword test anotherword Note that what I want to accomplish is to change 'test' into 'anotherword' only if it is not within the option tag. Thanks! - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Jim" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 12:42 PM Subject: Re: [PHP] Regex Help > addslashes() > > - Original Message - > From: "Jim" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, December 19, 2002 11:26 AM > Subject: [PHP] Regex Help > > > Could someone show me how to use preg_replace to change this: > > test test test > > into: > > anotherword test anotherword > > basically, I want to change a value only if it is not in an option > tag. > > I also want to account for situations like : > > test, something test test! > > My thoughts were to do the replace if the word (test) was not > surrounded by quotes or surrounded by greater/less than symbols. I > just have no idea how to formulate that with regex. > > Please help! Thanks. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] date part
Following on to the L T: $ar = explode("/",$thestring); thenL $ar[0] = 06 $ar[1] = 07 $ar[2] = 200 - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "'Diana Castillo'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 11:56 AM Subject: RE: [PHP] date part > How can I get a string containing the month part of a date the user types > in? > e.g. if they type in "06/07/200" I want to get "06" If you know that's the format they're going to use, the you can just use substr() to grab the first two characters. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] case statement?
switch() { case a: case b: case c: default: } RTFM - Original Message - From: "Max Clark" <[EMAIL PROTECTED]> To: <> Sent: Thursday, December 19, 2002 12:19 PM Subject: [PHP] case statement? Hi- I was wondering if php had a case function? Instead of building a large if/elseif/else block I would like to do a case $page in (list). Thanks in advance, Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regex Help
gawd, Jim, you are s oicky test test"; ereg("(.*)()(.*)",$q,$ar); $w1 = ereg_replace("test","anotherword",$ar[1]); $w2 = ereg_replace("test","anotherword",$ar[3]); $t = $w1.$ar[2].$w2; print $t; ?> outputs: anotherword, something test anotherword - Original Message - From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 12:25 PM Subject: Re: [PHP] Regex Help Whoops, sorry post aborted prematurely. What I was going say say was that: test, something test test! should become: anotherword, something test anotherword! Thanks again for helping! - Original Message - From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 1:24 PM Subject: Re: [PHP] Regex Help > Thanks for helping. Unfortunately, that doesn't quite accomplish the task > either. The other example for my first post would be mangled with that. > > - Original Message - > From: "Rick Emery" <[EMAIL PROTECTED]> > To: "Jim" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, December 19, 2002 1:09 PM > Subject: Re: [PHP] Regex Help > > > > > $q = "test test test"; > > ereg("(.*)()(.*)",$q,$ar); > > $t = "anotherword".$ar[2]."anotherword"; > > print $t; > > ?> > > > > outputs: > > anotherwordtestanotherword > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question about the exit() command
What do you mean "return to the calling page"? The exit() command simply ceases processing of PHP and HTML. I believe what you're saying is that if the user clicks on a PHP hyperlink on the first page, then goes to another page. If there is something "wrong" there, you nwant to return to the page from which you hyper-linked. If that is the scenario, the valriable $HTTP_REFERER refers to the calling page. So: if( condition) header("location: $HTTP_REFERER"); - Original Message - From: "Beauford.2002" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 3:45 PM Subject: [PHP] Question about the exit() command Hi, Could someone clarify this for me. I want to be able to exit out of a PHP webpage and return to the calling page if certain conditions are not met. It appears using exit() will do this, but I am unclear exactly how to use it. any info is appreciated. TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Another problem with conditional statements
switch() does not work that way. Switch uses the value in the parentheses and selects a CASE based upon that value. Read the manual. You will have to use a series of if()-elseif()-else() - Original Message - From: "Beauford.2002" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 6:19 PM Subject: [PHP] Another problem with conditional statements Hi, This should be as simple as breathing, but not today. I have two variables $a and $b which I need to compare in a switch statement in several different ways, but no matter what I do it's wrong. This is what I have tried, can someone tell me how it should be. TIA switch (true): case ($a == $b): This one seems simple enough. do sum stuff; break; case ($a && $b == 124): This appears not to work. do sum stuff; break; case ($a == 124 && $b == 755): If $a is equal to 124 and $b is equal to 755 then it should be true..doesn't work. do sum stuff; break; case ($a == 124 && $b != 124): Nope, this doesn't appear to work either. do sum stuff; break; endswitch; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] login
Do you mean loggged-in in the current browser session? If that, then cookies are good. If you mean EVER ogged in, then you'll want to look at a database, perhaps, mySQL. - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:20 AM Subject: [PHP] login Ok, Newbie Question. I know have a login and registration page on my website. What is the best way to check to see if the users have logged in before they access the other pages? SHould I add to each of the other url's ?clientid='' and if it is an empty string I know they haven't logged in? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
Actually, you don't need to send this as an html hyperlink. Simply using: http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$uname Should work; it does for me. - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:18 AM Subject: RE: [PHP] Re: mail() I changed this and it works fine but I now lose my formating. It doesn't seem to recognize the \n breaks. Am I asking for to much? -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I am using the following code but when I view the sent e-mail (in my yahoo > account) the link info is all plain text. I see the How do I create it as a link? I know I can send them because I have done it > before in my yahoo e-mail, just never through php and mail(). > > Thanks, > Eddie > > $mailcontent="Thank you for registering with AirCharterUnited \n" > ."Your Username is $uname and your password is $pword > \n" > ."Please click the following link to activate your > account \n" >." href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > name'>Activate Account"; >mail($email,'Thanks',$mailcontent,"From: > aircharterunited.com"); > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: mail()
that should be: http://www.aircharterunited.com\pages\activate_account.php?clientid=$uname (Grrr...that's what I get for using copy/paste from original email) - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Edward Peloke" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:04 AM Subject: Re: [PHP] Re: mail() Actually, you don't need to send this as an html hyperlink. Simply using: http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$uname Should work; it does for me. - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 8:18 AM Subject: RE: [PHP] Re: mail() I changed this and it works fine but I now lose my formating. It doesn't seem to recognize the \n breaks. Am I asking for to much? -Original Message- From: Mike Mannakee [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 8:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: mail() You need to set the correct header type: Content-type: text/html otherwise it defaults to: Content-type: text/plain Mike "Edward Peloke" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > I am using the following code but when I view the sent e-mail (in my yahoo > account) the link info is all plain text. I see the How do I create it as a link? I know I can send them because I have done it > before in my yahoo e-mail, just never through php and mail(). > > Thanks, > Eddie > > $mailcontent="Thank you for registering with AirCharterUnited \n" > ."Your Username is $uname and your password is $pword > \n" > ."Please click the following link to activate your > account \n" >." href='http:\\www.aircharterunited.com\pages\activate_account.php?clientid=$u > name'>Activate Account"; >mail($email,'Thanks',$mailcontent,"From: > aircharterunited.com"); > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with functions
Please show a bit more of the actual code - Original Message - From: "Beauford.2002" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, December 20, 2002 9:55 AM Subject: [PHP] Problem with functions Hi, I keep getting errors in my script that says 'x' function is undefined or 'y' function is undefined. I defined it as 'function test ($a, $b)' and call it using 'test($a, $b)' From my knowledge this is correct, but it just simply doesn't work. Anyone have any ideas on this? TIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Email problems.
This is not realy a PHP question; rather, it is an OutLook question. Regardless...when you opened the OutLook window to create your mail, did you go to the Menu->Format and select "Rich Text (HTML)"" - Original Message - From: "Steve Jackson" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Sunday, December 22, 2002 7:29 AM Subject: [PHP] Email problems. > I have generated a page on our server using PHP (from within a CMS system) > which I renamed the output .html to use in an html email. > My problem is when I cut and paste the HTML into the email (Outlook) it > either: > displays the code, > displays the html email and then when it's sent, sends it as an attachment > or sends it as a bunch of html links and badly formatted text. > > I assumed (badly) that Outlook would simply send HTML emails if you > formatted the program to send html emails but this seems almost impossible. > > Anyone have any suggestions? > > This is the page I want to send: > http://www.violasystems.com/e-news/template.html > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to specify dimensions of opened window?
Can't do this with PHP, which is server-side. You can, however, use PHP to generate JavaScript that will set the window parameters when executed. - Original Message - From: "Jody Cleveland" <[EMAIL PROTECTED]> To: "Php-General (E-mail)" <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 8:19 AM Subject: [PHP] how to specify dimensions of opened window? > Hello, > > I'm wondering, without the use of javascript, how to specify browser > parameters for pop up windows. Such as window size and whether there's a > toolbar. This would be for a popup when users would click on a link. > > Is this possible? > > -Jody Cleveland > > Winnefox Library System > Computer Support Specialist > [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to specify dimensions of opened window?
Use PHP print/echo statements to create the JavaScript code, just as you would HTML code. - Original Message - From: "Jody Cleveland" <[EMAIL PROTECTED]> To: "'Rick Emery'" <[EMAIL PROTECTED]>; "Php-General (E-mail)" <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 8:41 AM Subject: RE: [PHP] how to specify dimensions of opened window? > > You can, however, use PHP to generate > > JavaScript that will set the window parameters when executed. > > How would I do that? > > Jody > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to specify dimensions of opened window?
Do you know JavaScript? If not, start there. print "open(\"url\",\"window_name\",\"width=400,height=300menubar=no,status=no\")"; - Original Message - From: "Jody Cleveland" <[EMAIL PROTECTED]> To: "'Rick Emery'" <[EMAIL PROTECTED]>; "Php-General (E-mail)" <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 9:02 AM Subject: RE: [PHP] how to specify dimensions of opened window? > > Use PHP print/echo statements to create the JavaScript code, > > just as you would HTML code. > > Um... How would you go about doing that? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL vs PostgreSQL
You accidentally published this to the wrong email list. I assume you meant to send this to the MySQL email list. - Original Message - From: "Miro Kralovic" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 9:10 AM Subject: [PHP] MySQL vs PostgreSQL > Hi, > > I'm just deciding which DB to use for my projects and I'm not clear with one > thing... When considering a database for web, is MySQL good enough? I read > it only supports table locking, which is not very satisfying in such a > multiuser environment as the internet.. > > Based on your experience, what are pros and cons of MySQL and why most of > you prefer to use MySQL to PostgreSQL, which is aparently more powerful.. > > Thanks for your opinions.. > Miro.. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms
For my Linux (RedHat 7.1), it's at /etc/php.ini - Original Message - From: "Vicente Valero" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 10:25 AM Subject: [PHP] Forms I'm having problems using variables from a html form. I've been reading, and it seems that I have register_globlas=off in php.ini. But I've tried to find this file in my Linux, but I haven't been able to locate it. Could someone tell me where is it? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] calendar solution for workgroups ???
Another good PHP/mySQL calendar application. Group scheduling, etc. Does not have extraneous things such as web-mail. Cost is $35 http://abledesign.com/demo/calendar/ rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - > On Monday, December 23, 2002, at 06:09 AM, Tariq Murtaza wrote: > > > Hi all, > > I am looking for a good calendar system for a group of people. (PHP > > /Mysql) > > any idea?? > > > > Help/Comments will be appreciated. > > > > Tariq Murtaza > > > > > > > > -- PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > Brent Baisley > Systems Architect > Landover Associates, Inc. > Search & Advisory Services for Advanced Technology Environments > p: 212.759.6400/800.759.0577 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Are there macros in PHP?
What happened when you experimented with this code? You did try, right? - Original Message - From: "Don" <[EMAIL PROTECTED]> To: "php list" <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 11:57 AM Subject: [PHP] Are there macros in PHP? > Hi, > > I need to search a MySQL table based on a condition that can change at > runtime. > > Example > == > $condition = CustCode = "$HTTP_SESSION_VARS['logoncustcode']"; > > $queryID = mysql_query("SELECT * FROM CustTariff WHERE " . $condition . " > ORDER BY CustCode"); > > Will the above work? > > Thanks, > Don > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Populating textboxes and listboxes from a query result of a database table
Text box: print "\n"; List box: print "\n"; while($row = mysql_fetch_array($result)) { extract($row); print "$data_title\n"; } print "\n"; - Original Message - From: "Denis L. Menezes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 26, 2002 6:13 AM Subject: [PHP] Populating textboxes and listboxes from a query result of a database table Hello friends, Can someone please tell me where I can find sample scripts for populating textboxes and listboxes on a form(when the form opens) using the data from fields in a table? Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cheap Hosting
www.nomonthlyfees.com $200 first year, $70 per year thereafter. I put all my clients with this service. rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - From: Stephen To: PHP List Sent: Thursday, December 26, 2002 6:55 PM Subject: [PHP] Cheap Hosting Hello, I need a nice, reliable host for my new website. It needs to be fast, reliable, needs a good uptime, and some features. PHP and MySQL are the two I really need. Does anyone recomend one that's really cheap? So far I've found on, $5 a month, but it's slower then what'd I like. If nothing else pops up, I'll go with it. I'd also like domain parking and/or domain registration (don't really need the registration though). Thanks in advance! Thanks, Stephen Craton http://www.melchior.us "What is a dreamer that cannot persevere?" -- http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Warning: 1 is not a valid File-Handle resource - HELP!
The last line cannot be producing the warning; it does not refer to a file. Please show us the EXACT error message. Are you certain the file was opened? Did you try to print $stuff after reading it? Did it have the info you thought it should? - Original Message - From: "Phil Powell" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, December 29, 2002 3:08 AM Subject: [PHP] Warning: 1 is not a valid File-Handle resource - HELP! Ok, I am a bad coder. :( I can't figure this out at all: $fileID = fopen("nicknames.txt", 'r'); $stuff = fread($fileID, filesize("nicknames.txt")); fclose($fileID); if (strlen($stuff) > 0) $priorNickNewLine = "\n"; $nicks = explode("\n", $stuff); The last line produces the Warning.. why? I am trying to read contents from nicknames.txt and split according to the newline character so that each nickname is an array element. What did I do wrong? :( Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommend payment processors?
I use PayPal. Does not require a merchant account. PHP payment interface and interaction is easy to implement. Via HTML in your webpage, you pass to PayPal the URL of the PHP script to be executed when a payment is received. - Original Message - From: "Chad Day" <[EMAIL PROTECTED]> To: "php general" <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 10:14 AM Subject: [PHP] Recommend payment processors? Just wondering what people are using/recommend out there.. I'm going to be getting a merchant account and let people purchase services through my website on a secure server, all in PHP. What concerns me is this archived post I came across: http://marc.theaimsgroup.com/?l=php-general&m=102165623600464&w=2 Reading that, it sounds like it's not possible to use Payment Pro, or possibly other systems, with PHP .. is this correct? Some of the other posts in the archive sounded like people were using it, so I'm not really sure what is possible at this point. Thanks, Chad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Still executing afte die()?
You'll never get to the die() statement, because you redirected with the header() statement. - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 6:14 PM Subject: [PHP] Still executing afte die()? I have a page called 404.php which is set as the 404 page in a .htaccess file. At the top of this file, it has this: if(strtolower($_SERVER['REQUEST_URI']) != $_SERVER['REQUEST_URI']){ header("Location: http://{$_SERVER['HTTP_HOST']}".strtolower($_SERVER['REQUEST_URI'])); die; } which redirects to the same page with a lowercase URL if there are any uppercase characters. After that, it inserts the 404 into the database for checking later. But, when I test it with something like PaGeTHATSHOULDBELOWERCASE.php, it redirects to pagethatshouldbelowercase.php but still inserts it into the database (with the uppercase page name) even though the redirected page is 404-free. What am I doing wrong? -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mysql update problems
what appeared when you printed the text of your query: $query = "update bloggers set cache='$blog', title='$title' where url='$address'"; print $query; I'm thinking that your single quotes preventd $blog, $title, $address form being expanded. - Original Message - From: "Jesse Lawrence" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 05, 2003 10:27 AM Subject: [PHP] Mysql update problems I've been scratching my head over the following code for a while now. It's supposed to check a given weblog for specific tags, and if they're present, update the weblog's table in my database. I believe the problem is around the execution of the db query, but I can't seem to get it figured out. function is_news($address, $blogtitle, $host, $user, $pass, $dbname){ $f = fopen($address, 'r'); $read = fread($f, 2); fclose($f); $title_start = strpos($read, ""); $title_end = strpos($read, ""); $title = substr($read, $title_start, ($title_end - $title_start)); $blog_start = strpos($read, ""); $blog_end = strpos($read, ""); $blog = substr($read, $blog_start, ($blog_end - $blog_start)); $link = mysql_connect($host, $user, $pass) or die("Can't connect to database"); $query = "update bloggers set cache='$blog', title='$title' where url='$address'"; if(mysql_db_query ($dbname, $query, $link)) { $is_news = 1; }else{ $is_news = 0; } return $is_news; } Thanks a million for any help, Jesse Lawrence __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mysql update problems
Then the problem is in MYSQL. to help determine this, ALWAYS--ALWAYS include the "or die(mysql_error())" as part of the mysql_query(): mysql_db_query ($dbname, $query, $link) or die("Error: cannot read table$query".mysql_error()); - Original Message - From: "jesse" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 05, 2003 11:50 AM Subject: Re: [PHP] Mysql update problems No, the query is working fine... all variables are printing correctly. This is what has me confused. Everything seems to be as it should, it's just not updating the db table. Rick Emery wrote: > what appeared when you printed the text of your query: > $query = "update bloggers set cache='$blog', title='$title' where url='$address'"; > print $query; > > I'm thinking that your single quotes preventd $blog, $title, $address form being >expanded. > - Original Message - > From: "Jesse Lawrence" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, January 05, 2003 10:27 AM > Subject: [PHP] Mysql update problems > > > I've been scratching my head over the following code > for a while now. It's supposed to check a given > weblog for specific tags, and if they're present, > update the weblog's table in my database. I believe > the problem is around the execution of the db query, > but I can't seem to get it figured out. > > function is_news($address, $blogtitle, $host, $user, > $pass, $dbname){ >$f = fopen($address, 'r'); >$read = fread($f, 2); >fclose($f); >$title_start = strpos($read, ""); >$title_end = strpos($read, ""); >$title = substr($read, $title_start, ($title_end - > $title_start)); > > >$blog_start = strpos($read, ""); >$blog_end = strpos($read, ""); >$blog = substr($read, $blog_start, ($blog_end - > $blog_start)); > >$link = mysql_connect($host, $user, $pass) > or die("Can't connect to > database"); > > $query = "update bloggers set cache='$blog', > title='$title' where url='$address'"; > if(mysql_db_query ($dbname, $query, $link)) { > $is_news = 1; > }else{ > $is_news = 0; > } > >return $is_news; > > } > > Thanks a million for any help, > > Jesse Lawrence > > > > __ > Post your free ad now! http://personals.yahoo.ca > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Unexpected $end error?
When you get an error that points to , it means you did not close a {} or "" In this case, you did not close the: if ($row = mysql_fetch_array($result)) { Although you did close the "while do {}" immediately thereafter. - Original Message - From: "Vincent Bouret" <[EMAIL PROTECTED]> To: <> Sent: Sunday, January 05, 2003 4:56 PM Subject: [PHP] Unexpected $end error? Can someone tell me why I keep getting that error: Parse error: parse error, unexpected $end in D:\Program Files\Apache Group\Apache2\htdocs\proxy\acc_new.php on line 62 line 62 refers to Thanks for your help Vincent Here is the content of acc_new.php Account Management Tools - Add a new account Accounts Management Tools Add a new account Username: Password: Must contain between 4 and 20 characters. Firstname: Lastname: Email address: Usergroup: Back to Account Management Tools and here is the content of auth.php and mysql.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] time stamp screwing up
show us your database table structure (the whole thing). the NOW() will always work with a "date" or "timestamp" field - Original Message - From: "- [ Paul Ferrie ] -" <[EMAIL PROTECTED]> To: <> Sent: Monday, January 06, 2003 11:28 AM Subject: Re: [PHP] time stamp screwing up Well i am still getting all the zero's : ( : ( "- Edwin" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "- [ Paul Ferrie ] -" <[EMAIL PROTECTED]> wrote: > > So > > > > Is NOW() a mysql function? > > Well, you can check for yourself ;) > > It should be somewhere around here: > > http://www.mysql.com/doc/en/Date_and_time_functions.html > > - E > > ...[snip]... > > __ > Do You Yahoo!? > Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/ > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Img src
the problem is the "" before the width word it should be "\" - Original Message - From: "Ezequiel Sapoznik" <[EMAIL PROTECTED]> To: <> Sent: Tuesday, January 07, 2003 7:30 PM Subject: [PHP] Img src I am having a parse error in the following sentence: print ""; Thanks! Ezequiel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help - WHILE in FOREACH
Is this your exact code? I ask, because the following should generate a parse error: echo ""; You have 3 double-quotes ("). - Original Message - From: "James Brennan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 07, 2003 7:29 PM Subject: [PHP] help - WHILE in FOREACH The while statement is only executing correctly for the first run through the foreach loop. Why? Thanks, loop foreach($desc as $key=>$value) { printf("Show %s Description ", $key, $key); echo ""; while($row = mysql_fetch_row($show_names)) { printf("%s", $row[0], $row[1]); } echo ""; } _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I redirect to another php page
header("location: nextpage.php"); the above must be sent before any other text is output - Original Message - From: "Teo Petralia" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 08, 2003 2:46 PM Subject: [PHP] How can I redirect to another php page Hi All! I would like to redirect the user to another php page accordingly to his/her chosen options, example: if ($Color == "Yellow") { go to page else if ($Color == "Green") go to page } Does anyone knows how to achieve the goal?? Thanks Teo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] building web album - design questions
1. Store images separately with pointers in the database. It permits faster database queries. 2. 3. int imagecopyresized ( resource dst_im, resource src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH) - Original Message - From: "Anders Thoresson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 2:20 PM Subject: [PHP] building web album - design questions Hi, I'm planning to build a web album for my digital photographs, and have some questions regarding the design: 1) Is it better to store the images within the database, or just store pointers to the images which is put outside, in the filesystem? 2) At log in, I want to show to which albums new pictures have been added since last visit. For performance reasons, should information about last added pictures be added to the database, or is it ok to make a MySQL-query each time, comparing the add-date for every picture in every album with the users last log in date? 3) If I've understood things right, there is functions within PHP that can handle picture resizing? Is that correct? Best regards, Anders Thoresson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] What means "ioctl"
"ioctl" is an IO controls structure. Just look at the fopen("","r"). Do you notice anything missing? - Original Message - From: <[EMAIL PROTECTED]> To: <> Sent: Sunday, January 12, 2003 3:59 PM Subject: [PHP] What means "ioctl" I got the error-message: Warning: fopen("", "r") - Inappropriate ioctl for device what means ioctl? Harry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error in variable when looping
so where is $rowe set? Show us code that calls this page - Original Message - From: "menezesd" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 6:21 PM Subject: [PHP] Error in variable when looping Hello friends, I have made the following table of data and a button on every row to view the details. The code is working fine and the table is displayed with the buttons. The problem I have is that the $SelectedItemNumber posted to the next page remains the same number no matter which row button I click. I have my relevant code below. Please help me. I know I am making a mistake somewhere but I cannot figure out where. Quote : while($row=mysql_fetch_array($result)){ Print " "; Print "" ; Print " $row[OrgName] "; print " "; Print "" ; Print $row[OrgCountry]; print " "; Print "" ; Print $row[OrgNumber]; print " "; Print "" ; Print $row[Orgaddress]; print " "; Print "" ; Print $row[OrgChief]; print " "; Print "" ; Print""; print ""; Print"";} } ?> Unquote Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms
Do you mean like two SUBMIT buttons? Yes. - Original Message - From: "cj" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 7:32 PM Subject: [PHP] forms G'day All Just a quick question This is really a html more than a php question. Is it possible to have two buttons and have different actions for each button in the same form? Thanks CJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms
in HTML form: . . . in myscript.php: if(ISSET($HTTP_POST_VARS['submita'])) { } if ISSET(($HTTP_POST_VARS['submitb'])) { } - Original Message - From: "cj" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Php-List (E-mail)" <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 9:30 PM Subject: RE: [PHP] forms So, if I am understanding correctly The page that processes the form will have to work out which button got pressed? That should be easy enough to work out, I hope :-) -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 14 January 2003 2:21 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] forms --- cj <[EMAIL PROTECTED]> wrote: > Is it possible to have two buttons and have different > actions for each button in the same form? No, because the action belongs to the form, not the submit buttons (which is why action is an attribute of form). However, you can use different names and values for the submit buttons, so that you can tell which was pressed on your receiving page. This way you can act accordingly, which is probably what you wanted to know. Hope that helps. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] increment numbers...
$num = sprintf("%05d",$num); - Original Message - From: "Senani" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 13, 2003 10:21 PM Subject: [PHP] increment numbers... HI all, I need help on incrementing numbers starting with a 0 or more on php-4.2.3. When I increment a number like 2 (2++). Its out put is 3 ( not 3). But Its output had leading 0s on php-4.0.2. Does anybody know any function or any other simple way to do this. Rgds JanakaA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Persistent global data ?
cookies? - Original Message - From: "Mathias Rockel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 7:33 AM Subject: [PHP] Persistent global data ? Hi all ! I am currently writing some kind of Document/File-Library in a LAMP environment. As the library should be able to handle various file types, and most file types have to be handled differently internally, I would like to use Objects/Classes to make the code for the Library iself independent from the stuff that is individual to the different file types. Now I noticed early that when I use Objects in PHP and have to create many for them each time a script runs it slows the system down considerably. It seems you can now save objects in sessions which AFAIR was not possible last time I tried. But then I would have to read the whole file index (which is actually a tree) into a session variable for each user, and I don't know if thats a good idea performancewise. It would be a rather large multi-dimensional array. So I would like to know if there is any possibility in PHP to create my own persistent superglobal, a variable which can be read by any script running. I think something similiar is available as the "Application" Object in ASP under IIS. I know I have to take care of locking and stuff (although the end-user scripts would only need read access to it), but if I could write some functions which just would check if the tree is already in memory or not (after a server shutdown or whatever), and if not just read it in from the database to make it available in every other script. The only thing I've found so far which I think may be a possibility is the shared memory stuff that PHP supports, but I don't know anything about that on the system level, and its not explained in much detail in the PHP manual. Is that something I should follow, or can't I use it ? Can I somehow use the underlying Apache ? Are there better options ? any help/suggestions/hints are greatly appreciated ! mathias rockel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Persistent global data ?
Write persistent data to a file on server side - Original Message - From: "Mathias Rockel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 8:12 AM Subject: Re: [PHP] Persistent global data ? Hi! I'm not sure if that would be a good idea in respect to performance, also AFAIR cookies cannot save objects (can they?), and there are size limitations on cookies, so I probably cannot use them because they could not contain all the data ... and also, if I have the complete file structure saved on the client side its very easy to modify the data, possibly getting access to stuff that is not meant to be seen ... no cookies =). thanks anyway ! mathias rockel - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "Mathias Rockel" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 3:06 PM Subject: Re: [PHP] Persistent global data ? > cookies? > > - Original Message - > From: "Mathias Rockel" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 14, 2003 7:33 AM > Subject: [PHP] Persistent global data ? > > > Hi all ! > > I am currently writing some kind of Document/File-Library in a LAMP > environment. > > As the library should be able to handle various file types, and most file > types have to be handled differently internally, I would like to use > Objects/Classes to make the code for the Library iself independent from the > stuff that is individual to the different file types. > > Now I noticed early that when I use Objects in PHP and have to create many > for them each time a script runs it slows the system down considerably. It > seems you can now save objects in sessions which AFAIR was not possible last > time I tried. But then I would have to read the whole file index (which is > actually a tree) into a session variable for each user, and I don't know if > thats a good idea performancewise. It would be a rather large > multi-dimensional array. > > So I would like to know if there is any possibility in PHP to create my own > persistent superglobal, a variable which can be read by any script running. > I think something similiar is available as the "Application" Object in ASP > under IIS. I know I have to take care of locking and stuff (although the > end-user scripts would only need read access to it), but if I could write > some functions which just would check if the tree is already in memory or > not (after a server shutdown or whatever), and if not just read it in from > the database to make it available in every other script. > > The only thing I've found so far which I think may be a possibility is the > shared memory stuff that PHP supports, but I don't know anything about that > on the system level, and its not explained in much detail in the PHP manual. > Is that something I should follow, or can't I use it ? Can I somehow use the > underlying Apache ? Are there better options ? > > any help/suggestions/hints are greatly appreciated ! > > mathias rockel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] data move, Please Help..
try GOOGLE: access mysql php conversion I did - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "PHP general list" <[EMAIL PROTECTED]> Sent: Tuesday, January 14, 2003 8:48 AM Subject: [PHP] data move, Please Help.. Ok, I know I have asked this question before and I have asked it on the db forum, on asp forums, java applet forums, searched google, etc but can't really seem to find anything. I have to come up with a way to move data from an access db to the mysql db on the webserver. If I have to, I can upload the access file to the server and then transfer the data. Are there tutorials or samples somewhere of how to do this in php? Best case scenario would be to come up with a way (using any tool, java, activex, etc) to connect to the users machine and then upload the data directly from there. ANY help would be greatly appreciated! THANKS, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] attach image with the mail command?
this class will do all the work you need: instantiate with CMIMEMail() then attach with attachfile() add body with makebody() send with send() = /* * Notes from [EMAIL PROTECTED] 25 Mar 2000: * This library based idea of Dan Potter * Improvements: Multi attachmends in one e-mail, ability to post html & plain trext, up to 3x spe ed improved. * USSAGE - mimetype example for attacment * $m = new CMIMEMail($to,$from,$subject); * $m->mailbody("This is simply text","This is HTML text"); * $m->attach("example.html","text/html",$filebody); * $m->attachFile("resume.gif","image/gif"); * $m->send(); * NOTE: if your system have chunk_split function use it. *** * To Do: * 1. Make quoted-printable encoder and use them in makebody; * 2. Generate right boundaries * 3. Fix bugs in SMTP send direct futction SMTPsend() */ function my_chunk_split($str) { $stmp = base64_encode($str); $len = strlen($stmp); $out = ""; $done=0; while( $done<$len ) { $out.=( $len-$done>76)?substr($strp,$done, 76). "\r\n":substr($strp,$done, $len-$done). "\r \n"; $done+=76; } return $out; } class CMIMEMail { var $to; var $from; var $cc; var $bcc; var $subject; var $boundary = "=_NextPart_000_0009_01BF95E9.CDFD2060"; var $smtp_headers; var $filename_real; var $body_plain; var $body_html; var $atcmnt; var $atcmnt_type; function CMIMEMail($to,$from,$subject,$cc="",$bcc="",$priority=3) { $this->to=$to; $this->from=$from; $this->subject=$subject; $this->priority=$priority; $this->cc=$cc; $this->bcc=$bcc; } function mailbody( $plain, $html= "" ) { $this->body_plain=$plain; $this->body_html=$html; } function attach( $name, $content_type, $data ) { $this->atcmnt[$name]=$data; $this->atcmnt_type[$name]=$content_type; } function attachfile( $fname, $content_type ) { $name=ereg_replace( "(.+/)", "",$fname); $f=fopen($name, "r"); $fsz = filesize($name); $ftext = fread($f,$fsz); $this->attach($name,$content_type,$ftext); fclose($f); } function clear() { unset( $this->atcmnt ); unset( $this->atcmnt_type ); } function makeheader() { $out = "From: ".$this->from."\nReply-To: ".$this->from. "\n"; if( $this->cc !="") $out .="Cc: ".$this->cc."\n"; if( $this->bcc !="") $out .="Bcc: ".$this->bcc."\n"; $out.= "MIME-Version: 1.0\nContent-Type: multipart/mixed;\n boundary=\"".$this->boundary. "\"\ nX-Priority: ".$this->priority. "\n"; return $out; } function makebody() { $boundary2= "=_NextPart_001_0009_01BF95E9.CDFD2060"; $out= ""; $out= "\n\n".$this->body_plain. "\n\n"; if( $this->body_html!= "" ) { $out.= "--".$this->boundary. "\nContent-Type: multipart/alternative;\n boundary=$boundary2\n \n"; $out.= "$body_plain\n--$boundary2\nContent-Type: text/plain\nContent-Transfer-Encoding: quot ed-printable\n\n".$this->body_plain. "\n\n--$boundary2\nContent-Type: text/html\n". "Content-Transfer-Encoding: quoted-printable\n\n$this->body_html\n\n--$boundary2--\n" ; } else { # $out.= "--".$this->boundary. "\nContent-Type: text/plain\nContent-Transfer-Encoding: quoted -printable\n\n".$this->body_plain. "\n\n--".$this->boundary. "\n"; $out.= "--".$this->boundary. "\nContent-Type: text/plain\nContent-Transfer-Encoding: quoted- printable\n\n".$this->body_plain. "\n\n"; } if( ISSET($this->atcmnt_type) ) { reset( $this->atcmnt_type); while( list($name, $content_type) = each($this->atcmnt_type) ) { $out.= "\n--".$this->boundary. "\nContent-Type: $content_type\nContent-Transfer-Encoding: ba se64\nContent-Disposition: attachment; filename=\"$name\"\n\n". chunk_split(base64_encode($this->atcmnt[$name])). "\n"; } } $out.= "--".$this->boundary. "--\n"; return $out; } function send(){ mail( $this->to, $this->subject, $this->makebody(),$this->makeheader() ); } function sendto($email,$subj="#"){ if( $subj=="#") $subj= $this->subject; mail( $email, $subj, $this->makebody(),$this->makeheader() ); } function SMTPsend($host){ $errno=0;$errstr= ""; // $f=fsockopen("127.0.0.1",25,&$erno, &$errstr); if(!$f) { $this->send(); } else { //SNMP commands Not finished yet echo fgets($f,512); fputs($f, "HELO host.com\n"); echo fgets($f,512); fputs($f, "MAIL FROM: ".$this->from. "\n"); echo fgets($f,512); fputs($f, "RCPT TO: ".$this->to). "\n"; echo fgets($f,512); fputs($f, "data\n"); echo fgets($f,512); fputs($f, "From: ".$this->from. "\nTo: ".$this->to. "\n".$this->makeheader().$this->makebody (). "\n\n.\n"); fputs($f, "quit\nexit"); fclose($f); } } } ?> - Original Message - From: <[EMAIL PROTECTED]> To: <> Sent: Tuesday, January 14, 2003 7:09 PM Subject: [PHP] attach image with the mail command? how can i attach an image with the mail command how do get the image in a variable when i have chosen it with the
Re: [PHP] Question about $_GET
Make life easy for yourself: $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = ".$_GET['id']; - Original Message - From: "Frank Keessen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 4:50 AM Subject: [PHP] Question about $_GET Hi All, Can you please help me with the following problem? I've had code wich was running fine with php till i've upgraded to PHP version 4.2.3. The original code line was: $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = '$id'"; but it's not working when you have register_globals=Off So i've read everywhere to use the $_Get: So the code looks like this: $query = "SELECT Newsheadline, News, Contact FROM news WHERE Newsid = $_GET['id']"; But all i'm getting in my browser is: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' Can someone please help? Thanks and regards, Frank -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamic variables in a while loop?
for($ii=1; $ii<20; $ii++) { $helpz = "help$ii"; if(${$helpz} == "yes) { } else { } } - Original Message - From: "Philipp Hartmann" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 6:50 AM Subject: [PHP] dynamic variables in a while loop? Hi everyone. I am more of an ActionScript person, but I have to do this one in php. Should be easy for everyone familiar with php syntax... Here is what I want to do: I am getting several variables into a Php Script such as: help1 = "yes" / "no" help2 = "yes" / "no" . . . helpX = "yes" / "no" I need to check whether the variable is true or false, and according to that add 1 to a counter variable. Something like this I'd do in ActionScript, but dont know about php [CODE] $i = 0; While (++$i <= 8) { if ([help]+$i=="yes"){ // this line produces an error... $counterYes += counterYes; } } [/CODE] Do I have to initialize all variables before I can use them in php? Thank you very, very much for your time and your help!! Philipp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sending array
show us the test1.php code. show us the test2.php code. We can't read your mind. - Original Message - From: "Danielle van Gladbach" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 15, 2003 6:59 AM Subject: [PHP] sending array Hi, I am trying to send an array from one php to another: $org["index-A"]=1701; $org["index-B"]=1209; print "test2\n"; But if I try to read te array in test2.php, I get "Warning: Variable passed to each() is not an array ". Can anyone help me Danielle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display Dates in English o_O
look at mysql's DATE_FORMAT() Let mysql do it for you, instead of PHP - Original Message - From: Stephen To: PHP List Sent: Thursday, January 16, 2003 7:16 PM Subject: [PHP] Display Dates in English o_O I have a PHP driven site that as a time schedule. Since the site isn't exactly filled with very intellagent people who just LOVE to translate times and dates from a weird format (Such as the format used in MySQL), I'd like to take these from a MySQL table (the table's types are DATE and TIME) and translate the date to something like "Thrusday, January 16th, 2003" when the date strate from the table is "2003-01-16." Then with time, I'd like it to read something like "8:00 PM" when it reads straight from the table "20:00:00." Another feature I'd like to have it timezones but that's not the point of this message. If you don't mind, though, could you also tell me how to configure the times according the the timezone a user has chosen? Thanks, Stephen Craton http://www.melchior.us "What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $HTTP_GET_VARS
Show us your code - Original Message - From: "Mike Tuller" <[EMAIL PROTECTED]> To: "php mailing list" <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 4:05 PM Subject: [PHP] $HTTP_GET_VARS I am following an example in a book and have run into a problem with a script that I am trying to run under PHP 4.3.0. What I have is a page that you click on an id number that is from a listing in a database, and it is supposed to take you to a page to edit that item. I have the id sent in the url (http://127.0.0.1/asset/editasset.php?id=3) and the book says to use $HTTP_GET_VARS to take that id and display the record for editing on a separate page. When I use $HTTP_GET_VARS nothing is returned, and I am thinking that I can't use $HTTP_GET_VARS in PHP 4.3.0, so what do I need to use? Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Number Sign in String Variables
I have data that have #, so that is not the problem. Show us more code AND your database structure. - Original Message - From: "Joab Ben Stieglitz" <[EMAIL PROTECTED]> To: <> Sent: Friday, January 17, 2003 2:25 PM Subject: [PHP] Number Sign in String Variables I have a MySQL database that includes data with the # sign in some data fields. My PHP script pulls the data out of the database fine, but when I got to write back to the database, I get errors because the string gets truncated at the # sign. For example: $query = "INSERT INTO order_detail SET customer_id = -1, order_id = $order_no, item_id = $item_id, item_num = \"$item_num\", unit = \"$unit\", short_desc = \"$short_desc\", quantity = $quantity, wholesaler = \"$wholesaler\", cost = $cost, sale_price = $sale_price"; This statement fails if $short_desc contains a # sign. The string stops at the # sign, and all the subsequent fields are empty or garbage. None of the various resources I have looked at indicate that the # sign is a special character. Any suggestions? -- Joab Ben Stieglitz [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] simple date question
Why not just get the month with another call to date("m") as well? Then call date("W) to get the week, if that's required? - Original Message - From: "adrian [EMAIL PROTECTED]" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 20, 2003 8:42 AM Subject: [PHP] simple date question this is pretty simple but my brain's not working I get the numerical value of a week in the year thus e.g $today = date("W"); gives 4 .so this is the 4th week of the year. I want to get the month based on this number. e.g 4 should be january. 7 will be feb etc.. i'm not bothered about being too exact ,where some weeks are in 2 separate months, the earlier month should be displayed.and this is just for 2003. thanks, adrian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] DOWNLOAD
Neither HTML nor PHP open the "download" (Save/Save As) dialog. This is a function of the browser upon clicking any file link, other than an HTML file. - Original Message - From: "Shaun van den Berg" <[EMAIL PROTECTED]> To: <> Sent: Tuesday, January 21, 2003 12:39 AM Subject: [PHP] DOWNLOAD Hi , Im not sure if this can be done in PHP , i know PHP has upload features ! Does it have download features , wat i mean is the following : i want a link - click here to download - when you click on it , the download dialog box must appear - how do i do this ? Thanks Shaun van den Berg -- Novtel Consulting Tel: +27 21 9822373 Fax: +27 21 9815846 Please visit our website: www.novtel.co.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Adding a variable to oracle that contains quotation marks??
$query = "UPDATE ACTIVITY SET COMMENTS = \'$updatecomments\' WHERE ACTIVITY_ID =\'$actcode\'"; - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 21, 2003 6:53 AM Subject: [PHP] Adding a variable to oracle that contains quotation marks?? Hi All, I'm trying to add a variable to an oracle database but it fails due to the fact that it contains quotation marks. These have to be present for the end user. My Script is as follows: === if ($conn == true) { $query = "UPDATE ACTIVITY SET COMMENTS = '$updatecomments' WHERE ACTIVITY_ID = '$actcode'"; $cursor = Ora_Open ($conn); $result = Ora_Parse ($cursor, $query); $result = Ora_Exec ($cursor); ora_close($cursor); Ora_Logoff($conn); } === Can anyone tell me what to do! Thank you Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Input field array ends up as "Array" string
show us code - Original Message - From: "Dan Delaney" <[EMAIL PROTECTED]> To: <> Sent: Tuesday, January 21, 2003 8:33 AM Subject: [PHP] Input field array ends up as "Array" string Hi every body. I have a form that was originally working just fine. It had a series of input checkboxes with the same name ("interests[]"). These values then ended up in an array ($_POST['interests']), which I then imploded into a comma separated list ($interests = implode(', ', $_POST['interests']); ). Well, that was working just fine until yesterday when I started getting an error on that implode function ("Bad arguments to implode()"). So I did a "gettype" on $_POST['interests'] and it revealed that it is now ending up as a "string" variable. So I printed it and it contains the string "Array"! Anyone know what's going on here? Thanks --Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Page Rendering
$PHP_SELF is not interpreted by the browser. The browser shows only what is sent to it; PHP variables are not sent to the browser. Take the simple solution: don't use PHP_SELF; just use the file name - Original Message - From: "Bill Arbuckle, Jr." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 21, 2003 8:26 AM Subject: [PHP] Page Rendering Hi all. I am having some problems with a script which reads information from a database and creates a table. It works in IE but not Netscape. I call myself going through the tags to make sure all that were open were closed because Netscape doesn't like unfinished business. What I have is a script that outputs the previous page, 1, 2, ..., next page link (if there are more than x table items per page). It has worked in both browsers but now I have broke something. :o) Any ideas are appreciated. The code is like this ... < Prev | "; } // No need to output the page number if there is only one page if ($num_pages>1) { for ($i = 1; $i <= $num_pages; $i++) { if ($i != $page) { echo " $i"; } else { echo " $i "; } } } // Display the "Next" link. if ($page != $num_pages) { echo " | Next >" ; } } ?> This code is at the top of an include file which is included in pics.php. It seems that $PHP_SELF is interpreted differently in *some* instances between the two browsers. I can't figure it out because PHP_SELF is a server side evaluation. The links are output correctly in IE ... http://www.xyz.com/pics.php?page=2 ... but in Netscape I get ... http://www.xyz.com/?page=2 I had this problem once before and inadvertently fixed it with something else that I was doing. Any hints are appreciated. TIA, Bill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] $header = "Location:........" being ignored!
if ( $_POST['passwd'] != $db['password'] ) {header("Location: loginfailed.html"); exit; } - Original Message - From: "Shams" <[EMAIL PROTECTED]> To: <> Sent: Tuesday, January 21, 2003 3:48 AM Subject: [PHP] $header = "Location:" being ignored! Hi Group, I basically have some simple code such as: == if ( $_POST['passwd'] != $db['password'] {header("Location: loginfailed.html"); } //else $header = "Location: success.html"; == however, when I run this code, using a to submit password, username, etc.. if the passwords do not match, the page is forwarded to success.html ! Is there anything obvious that I am doing wrong? Thanks, Shams p.s. I don't want to use else{} because I have lots of if() checks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ADV SQL Help Needed.
SELECT risk_level, COUNT(*) FROM mytable GROUP BY risk_level; - Original Message - From: "[-^-!-%-" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 21, 2003 6:06 AM Subject: [PHP] ADV SQL Help Needed. Hello everyone, I need help with the following query. I have a table with a column named 'RISK_LEVEL'. RISK_LEVEL can hold three values: Low, Moderate, and High. I need a query that counts the number of occurences of each option. Now, I know I can do 'select count(risk_level) as levelCount where risk_level=low' for each level (low, moderate, and high). But, I was wondering if there's anyway to merge the queries into one. I'm looking for something like "select count(risk_level='low') as lowCount, count(risk_level='moderate')as modCount, count(risk_level='high') as highCount " Which will return, lowCount = 1 , modCount=3, and highCount=1, for table with id | risk_level 1 | low 2 | moderate 3 | moderate 4 | high 5 | moderate How do you do it? Can tha be done? When I run the code above, I get the same number for each record. i.e. lowCount, modCount, and highCount all come out to 5--which is the number of records in the table. Is this possible, or should I just run multiple queries? Please help. =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity Web Developement. Database. Hosting. Multimedia. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Read Mysql & Access
what did you find with a google search? - Original Message - From: Karl James To: php Sent: Monday, January 20, 2003 7:01 PM Subject: [PHP] Read Mysql & Access Is there a free ware program that will, allow me to take mysql dbase and convert it to ms ascess? Thanks Karl IncrediMail - Email has finally evolved - Click Here
Re: [PHP] HELP please quickly
In that case, I don't know of any PHP classes to help you. - Original Message - From: "Didier McGillis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 22, 2003 7:53 AM Subject: Re: [PHP] HELP please quickly No. The numbers are coming from two text files. The first text file is the file that I need to compare against the second file, and if I find one match in the second file, I need to move it to the third file. >From: "Rick Emery" <[EMAIL PROTECTED]> >Reply-To: "Rick Emery" <[EMAIL PROTECTED]> >To: "Didier McGillis" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> >Subject: Re: [PHP] HELP please quickly >Date: Wed, 22 Jan 2003 07:45:20 -0600 > >Are the numbers coming from a mysql database? If so, mysql can handle this >chore. > >- Original Message - >From: "Didier McGillis" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Wednesday, January 22, 2003 7:21 AM >Subject: [PHP] HELP please quickly > > >Here is a brief description of what I want to do. I want to use PHP to >grab >a list of numbers in one file. Check it against a bigger file and strip >the >ones that match out of the bigger file, into a "holding" file. > > >so here is what it might look like. > >file1.txt >456789 >456790 >456791 >456792 >456793 >456794 > > >file2.log >some time stamp >code=001;number=456784;name=blahblah;date=012403; >some time stamp >code=001;number=456785;name=blahblah;date=012403; >some time stamp >code=001;number=456786;name=blahblah;date=012303; >some time stamp >code=001;number=456789;name=blahblah;date=012503; >some time stamp >code=001;number=456789;name=blahblah;date=012503; >some time stamp >code=001;number=456789;name=blahblah;date=012503; >some time stamp >code=001;number=456789;name=blahblah;date=012503; >some time stamp >code=001;number=456789;name=blahblah;date=012503; >some time stamp >code=001;number=456790;name=blahblah;date=012603; >some time stamp >code=001;number=456791;name=blahblah;date=012703; > >notice there might be more then one of the same number, I only need one so >I >need to ignore the rest, rip out the time stamp, which is a seperate line. > >file3.txt >code=001;number=456789;name=blahblah;date=012503; >code=001;number=456790;name=blahblah;date=012603; >code=001;number=456791;name=blahblah;date=012703; > >can anyone help, any suggestions? > > > > > >_ >MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. >http://join.msn.com/?page=features/virus > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple E-mail Question
$mailheaders = "From: [EMAIL PROTECTED]\r\nCc: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]\r\nBcc: [EMAIL PROTECTED],[EMAIL PROTECTED]"; mail("[EMAIL PROTECTED]", "$Event Ticket Form", $msg, $mailheaders); - Original Message - From: "Scott Saraniero" <[EMAIL PROTECTED]> To: <> Sent: Wednesday, January 22, 2003 8:47 AM Subject: [PHP] Simple E-mail Question Hi, I'm using this line to send an e-mail with info: mail("[EMAIL PROTECTED]", "$Event Ticket Form", $msg, $mailheaders); If I want to add mail recipients, or cc, or bcc, how would I do this? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Image opendialog function
PHP cannot open a dialog on client. PHP is server-side only. Use JavaScript to open a dialog. - Original Message - From: "Steven Seijmonsbergen" <[EMAIL PROTECTED]> To: <> Sent: Wednesday, January 22, 2003 4:52 AM Subject: [PHP] Image opendialog function Hi I'm looking for a Opendialog function in php, With a thumb function where I can see examples of the selected photes? Does anyone Know that?? Greetz Steven -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP please quickly
Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: "Didier McGillis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a "holding" file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Is there a way to undo the md5() encryption??
No. md5() is not an encryption, it's a hash. - Original Message - From: "Scott Fletcher" <[EMAIL PROTECTED]> To: <> Sent: Wednesday, January 22, 2003 3:47 PM Subject: [PHP] Is there a way to undo the md5() encryption?? Hi! Is there a way to do the decryption of the encrypted data with the use of md5()?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_fetch_row problem
I'm gong to bet that $Location is alpha, not numeric. Therefore: $result = mysql_query("SELECT contactemail FROM loc WHERE location=\"$Location\"",$db); - Original Message - From: "Bryan Brannigan" <[EMAIL PROTECTED]> To: "Php List (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, January 23, 2003 8:03 AM Subject: [PHP] mysql_fetch_row problem Can someone tell me what I'm doing wrong with the following code. What I am trying to do with this is insert some data from a form into a database. Then I am querying another database to retrieve the email addresses related to $location. This is the error I get: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in D:\inetpub\webroot\usrmgr\upd.php on line 15 This is the problematic code: $db = mysql_connect("localhost", "webapp"); mysql_select_db("usermgr",$db); $sql = "INSERT INTO usernames (name,location,position,email,home,citrix,timberline,sawmill,counter,insides upport,am,receiving,shipping,purchasing,management,approval,uniqueid) VALUES ('$Name','$Location','$Position','$Emailaccess','$workathome','$citrix','$ti mberline','$sawmill','$countersales','$insidesales','$accountmanager','$rece iving','$shipping','$purchasing','$management','Waiting','$uniqueid')"; $result = mysql_query($sql); mysql_close($db); $db = mysql_connect("localhost", "webapp"); mysql_select_db("helpdesk",$db); $result = mysql_query("SELECT contactemail FROM loc WHERE location=$Location",$db); while($row = mysql_fetch_row($result)){ $contactemail = $row[0]; } Thanks in advance, Bryan ~~ "90% of being smart is knowing what you're dumb at." Bryan Brannigan Hancock Lumber System Administrator Information Technology (v)207.627.7694 (f)207.627.7041 [EMAIL PROTECTED] ~~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Who is foo & what is bar?
It comes from the acronym, FUBAR. This is military slang that has been around since WWII. FUBAR stands for: "F**ked Up Beyond All Repair" - Original Message - From: "Uttam" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 23, 2003 11:15 PM Subject: [PHP] Who is foo & what is bar? Hi list! I think this topic is worth discussion here... regds, -Original Message- From: Uttam [mailto:[EMAIL PROTECTED]] Sent: 21 January 2003 13:29 To:[EMAIL PROTECTED] Subject: [PHP-WIN] Who is foo & what is bar? In many code examples in PHP documention (& others also), I have seen authors referring to variables 'foo' & 'bar', but I have yet not discovered the origin of these names. I am sure there must be dozens of others who have the curiosity to find how the use of these names started. Can anyone quench the curiosities please? regards, -Original Message- From: Woolsey, Fred [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 05:29 To: [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Who is foo & what is bar? I'm pretty certain it is one of those brilliant, sarcastic military acronymns like SNAFU (situation normal, all f@#$%d up), as alluded to by Mikey- however, I believe the correct meaning is f@#$%d up beyond all repair. Witness the following hypothetical exchanges: "So soldier, what's the sitrep?" "SNAFU, sir..." and "How bad is it, soldier?" "Well sir, I'm afraid it's FUBAR..." Phonetically, FUBAR was simplified to FOOBAR, which allowed it to be parsed into FOO and BAR by standard software :-{)> Cheers, Fred Woolsey -Original Message- From: Chris Kranz [mailto:[EMAIL PROTECTED]] Sent: Tue 1/21/2003 8:35 AM To: [EMAIL PROTECTED] Cc: Subject: RE: [PHP-WIN] Who is foo & what is bar? Hehe!!! It's one of those classic terms that spans across many languages and dates back quite a long time. Whenever I pickup a programming book, somewhere in there, you'll find the infamous foo and bar... chris kranz fatcuban.com -Original Message- From: Mikey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 1:32 PM To: Uttam; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-WIN] Who is foo & what is bar? Just my opinion, but I think it comes from the acronym FUBAR - f@cked up beyond all recognition... Mikey > -Original Message- > From: Uttam [mailto:[EMAIL PROTECTED]] > Sent: 21 January 2003 13:29 > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: [PHP-WIN] Who is foo & what is bar? > > > In many code examples in PHP documention (& others also), I have seen > authors referring to variables 'foo' & 'bar', but I have yet not > discovered > the origin of these names. I am sure there must be dozens of others who > have the curiosity to find how the use of these names started. > > Can anyone quench the curiosities please? > > regards, > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange anomolie with each() and mysql_fetch_array()
First, if you expect only a single row returned, why are you using a while(){} construct? Second, mysql_fetch_array() does not like to operate within another function call. I've tried it on multiple occasions; failed. Third, each() operates on succeeding elements of an array; there are only two elements aparrently, so what are you expecting eac() to do? - Original Message - From: "Daevid Vincent" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 23, 2003 11:38 PM Subject: [PHP] Strange anomolie with each() and mysql_fetch_array() How come I *can* do these commands: $row = mysql_fetch_array($result,MYSQL_ASSOC); while(list($myVariableName,$sqlFieldName)=each($row)) { $$myVariableName = $sqlFieldName; } But I can't do this command? while(list($myVariableName,$sqlFieldName)=each(mysql_fetch_array($result ,MYSQL_ASSOC))) { $$myVariableName = $sqlFieldName; } Notice the only differenceis that the first one assigns the array to $row FIRST, whereas the second tries to avoid that extra call, especially since I know I'm only getting one row back. Hmmm? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange anomolie with each() and mysql_fetch_array()
> Because that magic incantation that Rasmus taught me many years ago will > take every field/column of the returned database row and make a variable > named the same thing with the corresponding value Use this (damned sight easier): extract($row) - Original Message - From: "Daevid Vincent" <[EMAIL PROTECTED]> To: "'Rick Emery'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 24, 2003 7:46 AM Subject: RE: [PHP] Strange anomolie with each() and mysql_fetch_array() > First, if you expect only a single row returned, why are you > using a while(){} construct? > Third, each() operates on succeeding elements of an array; > there are only two elements aparrently, > so what are you expecting each() to do? Because that magic incantation that Rasmus taught me many years ago will take every field/column of the returned database row and make a variable named the same thing with the corresponding value. So, for example, I will get $customer_id = 5, $customer_name = "Joe Blow", etc... And when you have a pant load of fields in one row, it comes in very very handy. > Second, mysql_fetch_array() does not like to operate within > another function call. I've tried it on > multiple occasions; failed. That seems like a bug to me then. Hence the reason I bring it up. Seems to me there is no reason the second statement shouldn't work just as the first. > - Original Message - > From: "Daevid Vincent" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 23, 2003 11:38 PM > Subject: [PHP] Strange anomolie with each() and mysql_fetch_array() > > > How come I *can* do these commands: > > $row = mysql_fetch_array($result,MYSQL_ASSOC); > while(list($myVariableName,$sqlFieldName)=each($row)) > { $$myVariableName = $sqlFieldName; } > > But I can't do this command? > > > while(list($myVariableName,$sqlFieldName)=each(mysql_fetch_arr > ay($result > ,MYSQL_ASSOC))) > { $$myVariableName = $sqlFieldName; } > > Notice the only differenceis that the first one assigns the array to > $row FIRST, whereas the second tries to avoid that extra call, > especially since I know I'm only getting one row back. Hmmm? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WHILE IF/ELSE loop not working
Define "fails" - Original Message - From: "Jay Fitzgerald" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 24, 2003 3:11 PM Subject: [PHP] WHILE IF/ELSE loop not working can anyone tell me why this while loop fails? == while ($row = mysql_fetch_array($sql_result)): $phone = $row["phone"]; $date = $row["date"]; if ($phone == "$_POST[areacode]$_POST[prefix]$_POST[suffix]"): if ($date == NULL): $date = "today"; echo "Congratulations! $_POST[areacode]-$_POST[prefix]-$_POST[suffix] is qualified with an available date of $date. "; elseif ($date != NULL): echo "Congratulations! $_POST[areacode]-$_POST[prefix]-$_POST[suffix] is qualified with a first available date of $date. "; else: echo "Sorry! $_POST[areacode]-$_POST[prefix]-$_POST[suffix] is not available at this time."; endif; endif; endwhile; == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] checkboxes & php
applies to selection lists, not checkboxes - Original Message - From: "Richard Whitney" <[EMAIL PROTECTED]> To: "Greg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, January 24, 2003 2:59 PM Subject: Re: [PHP] checkboxes & php I just logged in to my Yahoo mail account. I have only one account, but when I went to Preferences, it had a , which you might want to consider RW Quoting Greg <[EMAIL PROTECTED]>: ### I want to be able to let people check multiple values. I want them to be ### given a list of usernames and check the ones they want deleted, so a ### radio ### button won't work. If you go to Yahoo mail and select more than one ### checkbox, you can delete more than one item. I looked at the source and ### all ### the checkboxes are called "Mid". Any ideas? ### /Greg ### ### ### "Edward Peloke" <[EMAIL PROTECTED]> wrote in message ### [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ### > why would you give them all the same name? I can see this for radio ### buttons ### > but not checkboxes. ### > ### > -Original Message- ### > From: Greg [mailto:[EMAIL PROTECTED]] ### > Sent: Friday, January 24, 2003 3:27 PM ### > To: [EMAIL PROTECTED] ### > Subject: [PHP] checkboxes & php ### > ### > ### > If I have 3 checkboxes labeled "user", but each one has a seperate ### value, ### > how do I get the values of each checkbox? For example, how would I ### tell ### if ### > the following checkboxes are checked? ### > ### > ### > ### > ### > ### > ### > ### > ### > -- ### > PHP General Mailing List (http://www.php.net/) ### > To unsubscribe, visit: http://www.php.net/unsub.php ### > ### > ### ### ### ### -- ### PHP General Mailing List (http://www.php.net/) ### To unsubscribe, visit: http://www.php.net/unsub.php ### ### -- Richard Whitney Transcend Development Producing the next phase of your internet presence. [EMAIL PROTECTED] http://xend.net 602-971-2791 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Need help.
Show us your code...we can't read your mind. - Original Message - Thkiat wrote: > Can someone tell me what should I do to solve this problem? > > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result > resource in /home/epcc/public_html/exoops/class/database/mysql.php on line > 134 > > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result > resource in /home/epcc/public_html/exoops/class/database/mysql.php on line > 134 > > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result > resource in /home/epcc/public_html/exoops/class/database/mysql.php on line > 134 > > Warning: chmod failed: Operation not permitted in > /home/epcc/public_html/exoops/modules/PP-News/include/admin_envois_mails.php > on line 489 > > Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result > resource in /home/epcc/public_html/exoops/class/database/mysql.php on line > 134 > > Warning: chmod failed: Operation not permitted in > /home/epcc/public_html/exoops/modules/PP-News/include/admin_envois_mails.php > on line 489 > Erreur : Directory /home/epcc/public_html/exoops/modules/PP-News/archives/ > Directory , aucune archive n'a été crée > Newsletter sent to 2 users > > -- Sebastian Mendel [EMAIL PROTECTED] www.sebastianmendel.de www.tekkno4u.de www.nofetish.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Madness
If you're using root, then you must use the root password in mysql_connect(). - Original Message - From: "Gibbs, Liam - SXIA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 8:45 AM Subject: [PHP] MySQL Madness First off, when executing this command: $connection = mysql_connect("localhost", "root", ""); I get this error msg: Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'root@localhost' (Using password: NO) in /home/superpage/public_html/index.php on line 49 I've gone and read some information on the Internet (understanding almost nothing from the technical stuff--I'm a MySQL/server admin newbie), but I gathered some information. Now, a lot of what I read pertains to MySQL and not running it with PHP, but what I did gather from my own gruntwork file-searching and stuff on the Web was that I changed php.ini so that mysql.default_user = root and mysql.default_password = my password. Not a smart idea to run MySQL as root, but I'm trying to make headway. I restarted Apache. That didn't work. I didn't touch mysql.default_port, .default_host, or .default_socket (don't know if I should; didn't find anything that said I should), but I'm really stuck on this. Any other information on MySQL pertained strictly to MySQL and not PHP, and when I included PHP in my search criteria, it just came up with a bunch of pages that had PHP as an extension or a directory name. Searching the PHP-dev archives seems to bring up two search results which are the same conversation, and only really mention it in passing from what I understand. Any clues? I can access MySQL through the command ./mysql -u root -p mysql, but obviously that doesn't help when I'm supposed to access it through PHP. I've executed commands there fine. Not sure if it matters, but I have PHP 4.3.0 and MySQL 11.18 Distrib 3.23.54 for pc-linux (i686). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Warning: Failed opening
index.php is not in your include path; that is, not in working directory nor c:\hp4\pear. Where is it? - Original Message - From: "Ysrael Guzmán" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 29, 2003 8:54 AM Subject: [PHP] Warning: Failed opening This is my problem? Warning: Failed opening 'index.php' for inclusion (include_path='.;c:\php4\pear') in Unknown on line 0 Any IDEA? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie problem....
I always use 4 parameters in my setcookie(cookie_name,cookie_value,time,"/") Also, verify that $HTTP_POST_VARS['Name'] exists by printing it - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 7:20 AM Subject: Re: [PHP] cookie problem On Thursday 13 February 2003 16:07, Terry Lau wrote: > Hello, > I created a PHP page that included cookie, here is the PHP code: > if (isset($HTTP_POST_VARS['Name'])) { > setcookie("Name", $HTTP_POST_VARS['Name'], time()+86400*10); > } [snip] > But when I called the cookie variable in another page, it showed > "Notice: Undefined index: Name in". Here is the PHP code in another > page: > > > > Untitled Document > > > > > HI!! > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] sending e-mail with 'Bcc:' and 'Cc:' not working....
mail("[EMAIL PROTECTED]","This Is A Subject",$message,"From: [EMAIL PROTECTED]\r\nCc: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]\r\nBcc: [EMAIL PROTECTED],[EMAIL PROTECTED]"); Separate addesses with commas. Separate CC and BCC with \r\n - Original Message - From: "Scott Fletcher" <[EMAIL PROTECTED]> To: <> Sent: Thursday, February 13, 2003 11:32 AM Subject: [PHP] sending e-mail with 'Bcc:' and 'Cc:' not working I'm a little puzzled on why does either of these two, 'Bcc' and 'Cc' not work when I had successfully send the e-mail. My best guess is that I need additional header, if so then what are the required header needed to make this 'Bcc' and 'Cc' work? Here's the Internet Header from the " To: " e-mail that worked. --clip-- Received: from localhost (host.domain.com [0.0.0.0]) by hostname.domain with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 1KAAMHG6; Thu, 13 Feb 2003 11:58:34 -0500 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Return-Path: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: e-Mail Test Date: Thu, 13 Feb 2003 12:03:48 EST --clip-- Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problems with cookies and PHP
setcookie("userinfo","userid",NULL,"/"); - Original Message - From: "Fireborn Silvaranth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 11:58 AM Subject: [PHP] problems with cookies and PHP ok now it will print it's value correctly but what about actually changing the cookie's value? this line: $_COOKIE['userInfo']="userID"; sets $_COOKIE['userInfo'] to "userID" but it does not change the cookie file itself. what must I do to accomplish that? - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Fireborn Silvaranth" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 9:41 AM Subject: Re: [PHP] problems with cookies and PHP > > >print "$_COOKIE['userInfo']"; > > > > > Should be: > print $_COOKIE['userInfo']; > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Removing a comma from a form field
$thestr = str_replace(",","",$thestring); - Original Message - From: "Ben C." <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:13 PM Subject: [PHP] Removing a comma from a form field I'm trying to update a field which contains a $USD figure. But when I update it as 200,000 it become 200. I need to take out the comma. Is using ereg_replace function the best way of doing so? What do you think. Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form within form
What do you mean by "verify that info"? Do you mena verify for content, or form, or what... - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:22 PM Subject: [PHP] form within form I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form within form
Rather than form within a form, provide 3 fields: old password, new password, username Verify against old password. If that's valid, then change password. Or am I missing something here? - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:30 PM Subject: RE: [PHP] form within form I apologize I mean when they click the 'verify' button, I verify their username and password before I allow them to update it. Eddie -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 1:27 PM To: Edward Peloke; Php-General@Lists. Php. Net Subject: Re: [PHP] form within form What do you mean by "verify that info"? Do you mena verify for content, or form, or what... - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:22 PM Subject: [PHP] form within form I am creating a form to allow the user to change his/her password. After the user enters their username and old password, I need to verify that info before they can change their user name and password. So I tried using a form within a form but am having some problems with passing the parameters back and forth...any new ideas would be greatly appreciated. I will fill in all the db stuff later. Thanks, Eddie UserName: '> Password: New Password: Verify Password: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problems with cookies and PHP
In your code, it appears you are attempting to determine the value of the cookie immediately upon setting. The value of the cookie is NOT available at this point; a new page must be opened. Why are you setting time to 0? If you want cookie to disappear at end of the session, use NULL. Are you certain that $_COOKIE[] is available to you? have you tried $HTTP_COOKIE_VARS[]? Your code ends with two braces ( } ); why? It should end with a single brace. - Original Message - From: "Joshua Chapman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 13, 2003 12:57 PM Subject: [PHP] problems with cookies and PHP This is driving me nuts... it won't set or reset the cookie no errors no nothing... I've learned quite a bit about cookies and PHP thus far but something important must still be eluding me. I've read the manual entry on it, is there any other tutorial out there that's better? what am I doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ereg usage
The problem is that it's looking for hyphen, - , immediately preceeding the end. Remove the $. - Original Message - From: "Peter Gumbrell" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Sunday, February 16, 2003 9:18 AM Subject: [PHP] ereg usage Could someone please tell me why this code is not working: ereg ('^[A-H]*([0-9]+)-$', $rank, $matches); $workshop_ID = $matches[1][2}; where $rank is something like C12-1 and I just need the C12 part. Many thanks Peter Gumbrell [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem creating array from MySql query
It helps if you show us all your code, not just what you think we might need. For isntance, what does your mysql_query() statement look like? Does it have an "or die(mysql_error()))" clause? - Original Message - From: "Janyne Kizer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 9:04 AM Subject: [PHP] Problem creating array from MySql query What we are trying to do is build an array from a query. I don't understand why but this is failing on the line "$affiliations[] = $affiliation_row["affiliation"];" Basically there are two tables in the database, since clubs can have multiple affiliations and the affiliations are not set in stone, there is one table only for affiliations. We are trying to pull the data out of the table for editing. Any tips would be appreciated. Thanks! $affiliation_result = mysql_query("SELECT affiliation FROM club_affiliations WHERE club_id=$id"); $affiliations = array(); print "Populating array..."; //place affiliation data into an array that we can search later while($affiliation_row = mysql_fetch_array($affiliation_result)) { print $affiliation_row["affiliation"]; $affiliations[] = $affiliation_row["affiliation"]; } //while -- Janyne Kizer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem creating array from MySql query
where is $id set in ("SELECT affiliation FROM club_affiliations WHERE club_id=$id") Also, change to: $query = ("SELECT affiliation FROM club_affiliations WHERE club_id=$id""; $affiliation_result = mysql_query($query) or die(mysql_error()); The above will help identify bad queries. rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - From: "Janyne Kizer" <[EMAIL PROTECTED]> To: "Rick Emery" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 9:31 AM Subject: Re: [PHP] Problem creating array from MySql query Thanks for taking a look at this. It does print the affiliations in "print $affiliation_row["affiliation"];" and it works properly (except for getting the affiliations field) if the line "$affiliations[] = $affiliation_row["affiliation"];" is commented out. Rick Emery wrote: > > It helps if you show us all your code, not just what you think we might need. > > For isntance, what does your mysql_query() statement look like? Does it have an "or > die(mysql_error()))" clause? > > - Original Message - > From: "Janyne Kizer" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 17, 2003 9:04 AM > Subject: [PHP] Problem creating array from MySql query > > What we are trying to do is build an array from a query. I don't > understand why but this is failing on the line "$affiliations[] = > $affiliation_row["affiliation"];" Basically there are two tables in the > database, since clubs can have multiple affiliations and the > affiliations are not set in stone, there is one table only for > affiliations. We are trying to pull the data out of the table for > editing. Any tips would be appreciated. Thanks! > > $affiliation_result = mysql_query("SELECT affiliation FROM > club_affiliations WHERE club_id=$id"); > > $affiliations = array(); > > print "Populating array..."; > //place affiliation data into an array that we can search later > while($affiliation_row = mysql_fetch_array($affiliation_result)) { > print $affiliation_row["affiliation"]; > $affiliations[] = $affiliation_row["affiliation"]; > } //while > > -- > Janyne Kizer -- Janyne Kizer CNE-3, CNE-4, CNE-5 Systems Programmer Administrator I NC State University, College of Agriculture & Life Sciences Extension and Administrative Technology Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem creating array from MySql query
If you have to comment out "$affiliations[] = $affiliation_row["affiliation"];", tghen it's not working, because this is the crux of your algorithm. What error are you getting? rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - From: "Janyne Kizer" <[EMAIL PROTECTED]> To: "Rick Emery" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 9:31 AM Subject: Re: [PHP] Problem creating array from MySql query Thanks for taking a look at this. It does print the affiliations in "print $affiliation_row["affiliation"];" and it works properly (except for getting the affiliations field) if the line "$affiliations[] = $affiliation_row["affiliation"];" is commented out. Rick Emery wrote: > > It helps if you show us all your code, not just what you think we might need. > > For isntance, what does your mysql_query() statement look like? Does it have an "or > die(mysql_error()))" clause? > > - Original Message - > From: "Janyne Kizer" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 17, 2003 9:04 AM > Subject: [PHP] Problem creating array from MySql query > > What we are trying to do is build an array from a query. I don't > understand why but this is failing on the line "$affiliations[] = > $affiliation_row["affiliation"];" Basically there are two tables in the > database, since clubs can have multiple affiliations and the > affiliations are not set in stone, there is one table only for > affiliations. We are trying to pull the data out of the table for > editing. Any tips would be appreciated. Thanks! > > $affiliation_result = mysql_query("SELECT affiliation FROM > club_affiliations WHERE club_id=$id"); > > $affiliations = array(); > > print "Populating array..."; > //place affiliation data into an array that we can search later > while($affiliation_row = mysql_fetch_array($affiliation_result)) { > print $affiliation_row["affiliation"]; > $affiliations[] = $affiliation_row["affiliation"]; > } //while > > -- > Janyne Kizer -- Janyne Kizer CNE-3, CNE-4, CNE-5 Systems Programmer Administrator I NC State University, College of Agriculture & Life Sciences Extension and Administrative Technology Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem creating array from MySql query
what times out? The query? rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - From: "Janyne Kizer" <[EMAIL PROTECTED]> To: "Rick Emery" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 9:51 AM Subject: Re: [PHP] Problem creating array from MySql query No error. It just times out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] MD5 login troubles
Make it easy on yourself: $pw = md5($password); $query = "INSERT INTO penpals (email, password, username) VALUES \"$email\",\"$pw"\,\"$username\")"; mysql_query($query); $pw = md5($password); $query = "SELECT email,password,username FROM penpals WHERE email=\"$email\" && password=\"$pw\""; $result = mysql_query($query) or die(mysql_error()); rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - From: "Vernon" <[EMAIL PROTECTED]> To: <> Sent: Monday, February 17, 2003 10:16 AM Subject: [PHP] MD5 login troubles Hey all, I'm using the following code to save an MD5 password into a database along with an unencrypted username and email address: $insertSQL = sprintf("INSERT INTO penpals (email, password, username) VALUES (%s, MD5(%s), %s)", All seems to have worked well, the password is encrypted and so forth. I have also attempted to use the following MySQL command to encrypt the password and came up with the same result: UPDATE penpals SET password = MD5(password) WHERE ID = 1 So the trouble seems to be with the login where I am using the following code: SELECT email, password, access FROM penpals WHERE email= '%s' AND password = MD5('%s') Am I missing something here? Am I some how double encrypting the password? Is there a de-encrypt function or something I'm missing? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] check if a file has already be included
can you use: include_once("filename"); This way, if it wasn't included, it will be. If it was included, this statement is ignored. - Original Message - From: "Greg" <[EMAIL PROTECTED]> To: <> Sent: Monday, February 17, 2003 10:18 AM Subject: [PHP] check if a file has already be included Is there any way to check if a file has been included / required already, and if not include / require it? Thanks! -Greg -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] select query question
SELECT * FROM mytable WHERE flags NOT IN('L','C') rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - From: "Sunfire" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 11:19 AM Subject: [PHP] select query question hi i have a select query i need to do on a field in my table.. the field is called Flags and there is 1 char for every flag that is set for a certain group.. the flags are F S L C G R now what i want to do is search for every instance of Flags field that has any value except L and C in it and select those fields.. so the result would be every record that doesnt have L and C in the Flags field would be selected.. dont know how to do this query i thought it might be something like this: mysql_query("select * from members where Flags not like '%l%c%'"); but not really sure.. i know to use the not like statement but its just figuring out what search pattern to use... tnx --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP not enabled in RedHat 7.x distro
I also use Redhat 7.1 and use FTP successfully. Something in your setup? rick "People will forget what you said. People will forget what you did. But people will never forget how you made them feel." - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 17, 2003 11:44 AM Subject: [PHP] FTP not enabled in RedHat 7.x distro Hi, Installed RPM's from RedHat (latest patches) and using PHP with Apache under RH7.1 Linux, lots of scripts, no problems. The hitch is that a user just tried ftp_connect(), and got the "unknown function" error. Okay, so I expected this to be a missing php.so loadable module. However, it appears more like an option "--enable-ftp" needs to be specified at _compile time_ to get it working. Is this really the case? Does RedHat _really_ not distribute with this feature already on? Am I even barking up the right tree?!? Many thanks in advance... -- Best regards, James. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] why won't this work?
I did a View->Source on the generated code and got this for the Friday Feb 28 entry: Friday February 28th 8 AM to Noon John Look at the last ... line. Fix that, and your problems may go away. - Original Message - From: "Edward Peloke" <[EMAIL PROTECTED]> To: "Php-General@Lists. Php. Net" <[EMAIL PROTECTED]> Sent: Tuesday, February 18, 2003 7:24 AM Subject: [PHP] why won't this work? Why won't this work? I have a form that people enter in a time to volunteer, when the submit it, I call the same page and want the time to then show on the page but I have to refresh it to see the time and sometimes it just doesn't show up. It is like the page loads before all the sql statements are run because if I print them and run them in mysql, I get results. the test page is here...I know it is ugly... http:\\peloke.webhop.org\mom\bikers.php Thanks, Eddie Please sign up for the hours that you can work. We need a minimum of 3 men there for each shift. They will be doing the tire pressure checks and any other minor maintenance that might be required. Ladies are also urged to come as we are hoping there will be women bikers that we can minister to in whatever way is needed. Anyone can come anytime but we need to have enough commitments that we know the break will be staffed adequately every shift. We cannot give away anything that would compete with the drinks and snacks that are sold at the rest stop but we can give away ice water and possibly coffee. Thanks for your help! SIGN Up Name Time Friday, February 28, 8 a.m.-12 p.m. Friday, February 28, 12 p.m.-4 p.m. Friday, February 28, 4 p.m.-8 p.m. Saturday, March 1, 8 a.m.-12 p.m. Saturday, March 1, 12 p.m.-4 p.m. Saturday, March 1, 4 p.m.-8 p.m. Sunday, March 2, 8 a.m.-12 p.m. Sunday, March 2, 12 p.m.-4 p.m. Sunday, March 2, 4 p.m.-8 p.m. Friday February 28th 8 AM to Noon "; print $myrow["name"]; print ""; } ?> Friday February 28th 12 p.m to 4 p.m. "; print $myrow1["name"]; print ""; } ?> Friday February 28th 4 p.m. to 8 p.m. "; print $myrow2["name"]; print ""; } ?> Saturday March 1st 8 AM to Noon "; print $myrow3["name"]; print ""; } ?> Saturday March 1st 12 p.m to 4 p.m. "; print $myrow4["name"]; print ""; } ?> Saturday March 1st 4 p.m. to 8 p.m. "; print $myrow5["name"]; print ""; } ?> Sunday March 2nd 8 AM to Noon "; print $myrow6["name"]; print ""; } ?> Sunday March 2nd 12 p.m to 4 p.m. "; print $myrow7["name"]; print ""; } ?> Sunday March 2nd 4 p.m. to 8 p.m. "; print $myrow8["name"]; print ""; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forms and MySql date
mysql stores date as -mm-dd that is how the date should be entered into the form If entered in another format, you can reformat it. - Original Message - From: "Mike Tuller" <[EMAIL PROTECTED]> To: "php mailing list list" <[EMAIL PROTECTED]> Sent: Thursday, February 20, 2003 4:43 PM Subject: [PHP] Forms and MySql date I have a form that I want to enter a date into a MySql database. I currently have the column in the database set as Date, and can't seem to get the date I enter into the text field to go into the database using the format yymmdd. I could change the column to varchar, and then it would enter, but this will be a database that I want to keep track of purchases, and if it is entered in as text, I wouldn't be able to do calculations such as showing how old something is. How can I have a text field where a person enters the date and have that information entered into the database? Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Re: Mysql DB connect failure
$db = mysql_pconnect("localhost", "test1", "test1") or die(mysql_error()); - Original Message - From: "ML" <[EMAIL PROTECTED]> To: <> Sent: Friday, February 21, 2003 9:33 AM Subject: [PHP] Re: Mysql DB connect failure Where exactly would I put the print mysql_error() ? Here is the code... "); "Hans Prins" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > did you try: > print mysql_error(); > > "Ml" <[EMAIL PROTECTED]> schreef in bericht > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Currently I have some php code that displays a message if a connect to my > > database fails. Is there anyway I > > can get a more descriptive error message? So I can see exactly why my php > > can't connect to the Database? > > I am pretty sure that the username and password are correct and the > username > > exists as a mysql user... > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's the matter?
- Original Message - From: "X" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 22, 2003 7:36 AM Subject: [PHP] what's the matter? index.php: choice your gender male female x.php: but at last it said that the gender had not been defined??? help me! thank u!~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with readfile on jpegs
Show us code. The error refers to line 87. We need to see that, and other code surrounding 87. - Original Message - From: "Patrick Teague" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 6:45 AM Subject: [PHP] Problem with readfile on jpegs I found info on php.net about how to set content type for a file & then cause it to be a downloaded file. So far it's been working for showing everything until I tried having it display a jpeg. Here's the code I have - header("Content-type: ".$atype); readfile(include($afile)); The only problem is I get this error when it tries to display the jpeg - The image "http://localhost/pic/picdb.file.php?id=3"; cannot be displayed, because it contains errors. I decided to have it print some stuff to check to make sure it was getting the correct info & here's what it printed out after my print statements. I left out the line about can't modify header info after printing other stuff as that's obvious - Warning: Unexpected character in input: '' (ASCII=15) state=1 in C:\apache\upload\splash.jpg on line 87 Parse error: parse error, unexpected T_STRING in C:\apache\upload\splash.jpg on line 87 Any ideas how to proceed? I would have it simply display the file instead except that this is displaying uploaded files that are not in web viewable directories. The reason for this is so the admin can view the file & determine whether it should be viewable or not prior to releasing it to the web. Either way, simply displaying the jpeg from a web viewable directory works. Patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] editing field value using selectbox with options
$titles = array("Mr.","Ms.","Mrs.","Dr.","Capt."); print "\n"; foreach($titles as $value) { if($row['title]==$value) $sel="SELECTED"; else unset($sel); print "$value\n"; } print "\n"; - Original Message - From: "Denis L. Menezes" <[EMAIL PROTECTED]> To: "PHP general list" <[EMAIL PROTECTED]> Sent: Tuesday, February 25, 2003 9:08 AM Subject: [PHP] editing field value using selectbox with options Hello friends. In an edit form, I need the following select box. Mr. Ms. Mrs. Dr. Capt. My problem is : since I am getting the selected value from the database and showing it (for editing the option value and later updating), I do not know how to show the selected value(value of the option from the existing field value in the database) in the edit form(when opening the edit form) along with the other option values. Can someone help? I am using PHP and $row. Thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php