Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Matt Harnaga
Double quotes expand variables, that is, if $a = 2, then echo The value is $a2; will print The value is 2. Single quotes return strings literally. So, echo 'The value is $a2' would print The value is $a2 Cheers rory walsh wrote: Can anyone tell me if there is a difference between double quotes

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread rory walsh
Thanks guys, that clears up a lot! Cheers, actually I have to say goodbye to broadband for a while so I hope that I can make it on my own! That's why I have been asking all these obvious little questions! Cheers, Rory. Jochem Maas wrote: rory walsh wrote: Can anyone tell me if there is a

Re: [PHP] Newbie question: qutoes?

2005-03-06 Thread Matt Harnaga
You might want to check this out as well: http://www.zend.com/zend/tut/using-strings.php rory walsh wrote: Can anyone tell me if there is a difference between double quotes and single quotes? Cheers, Rory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] [NEWBIE] How to allow for a href tags but no others? [SOLVED]

2005-03-02 Thread Dave
Alberto, Thank you for your explanation and your example code. I think this is how I am going to go forward in allowing my users to input links. Your time in replying is much appreciated. Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-27 Thread abrea
? Hope this helps. Alberto Brea -Original Message- From: Dave [EMAIL PROTECTED] To: php-general@lists.php.net Date: Sat, 26 Feb 2005 12:27:04 +0900 Subject: Re: [PHP] [NEWBIE] How to allow for a href tags but no others? Alberto, John, Jochem, Richard, Tyler, Thank you for your very

[PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread Dave
PHP General, 1. The Situation: I have a forum in which users can enter text which is then displayed on my web site. I want to be able to allow them to insert their own a href tags to provide links. The text is stored in a MySQL database. 2. The Problem: My understanding is that if

Re: [PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread Jochem Maas
Dave wrote: PHP General, ... 4. What I've Done So Far: I've looked into the *htmlspecialchars()* http://jp.php.net/manual/en/function.htmlspecialchars.php and *htmlentities(), thinking that they perhaps could pull out characters used in tags, but they seem to be more for formatting

Re: [PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread John Nichel
Dave wrote: PHP General, 1. The Situation: I have a forum in which users can enter text which is then displayed on my web site. I want to be able to allow them to insert their own a href tags to provide links. The text is stored in a MySQL database. 2. The Problem: My understanding

Re: [PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread abrea
, which looks like a big source of problems. Hope his helps Alberto Brea -Original Message- From: Dave [EMAIL PROTECTED] To: php-general@lists.php.net Date: Fri, 25 Feb 2005 17:36:31 +0900 Subject: [PHP] [NEWBIE] How to allow for a href tags but no others? PHP General, 1

Re: [PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread Richard Lynch
Can I set up a PHP script which will strictly only allow instances of a href=??? and /a and absolutely nothing else? I would like the http://php.net/strip_tags You'll still want to use a Regular Expression to rip out every attribute/value other than HREF, but at least all the other HTML

RE: [PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread Tyler Replogle
($url_array[$i], [url=http)){ $url_array[$i] = str_replace([url=,[url=http://,$url_array[$i]); } } $url = implode( , $url_array); } return $url; } ///done/ I hope that helps you From: Dave [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] [NEWBIE

Re: [PHP] [NEWBIE] How to allow for a href tags but no others?

2005-02-25 Thread Dave
Alberto, John, Jochem, Richard, Tyler, Thank you for your very helpful advice. So far I'm thinking of definitely including some of Tyler's code for doing some filtering, along with the other commands mentioned, like strip_tags() for securing the input. However, I would like to ask

Re: [PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT'] [SOLVED]

2005-02-21 Thread Dave
Thank you all for your responses. The problem is now half solved. In the majority of cases, using a period before the directory path ( i.e. ./directory ) will give me the correct path to the directory I specify from the relative path from the web root. However, it still will not work with

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-21 Thread Jochem Maas
John Nichel wrote: The Disguised Jedi wrote: i think you have to use the ID parameter in the input tag in your HTML Name: input type=text name=name value=your name id=name /br/ Age: input type=text name=age value=your age id=age /br/ try that and see how it goes If I'm not mistaken, ID in a

[PHP] [NEWBIE] PEAR Help

2005-02-21 Thread Brett Patterson
Hello all. I am new to using PEAR, but not so much to PHP. I was looking for a little help. I'm trying to get my contact script to work with the PEAR::Mail extension. So I followed the tutorial on pear.php.net about using the object = Mail::factory() and then the object::send() method to

[PHP] [NEWBIE] PEAR::Mail Help Please

2005-02-21 Thread Brett Patterson
Hello all. I am new to using PEAR, but not so much to PHP. I was looking for a little help. I'm trying to get my contact script to work with the PEAR::Mail extension. So I followed the tutorial on pear.php.net about using the object = Mail::factory() and then the object::send() method to

RE: [PHP] [NEWBIE] PEAR::Mail Help Please

2005-02-21 Thread Jay Blanchard
[snip] require_once('config.php'); Config.php [/snip] Perhaps it is a capitalization issue? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] [NEWBIE] PEAR::Mail Help Please

2005-02-21 Thread Jay Blanchard
[snip] Hello all. I am new to using PEAR, but not so much to PHP. I was looking for a little help. [/snip] Have you tried a PEAR mailing list? http://pear.php.net/support/lists.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [NEWBIE] PEAR::Mail Help Please

2005-02-21 Thread Jason Barnett
Jay Blanchard wrote: [snip] Hello all. I am new to using PEAR, but not so much to PHP. I was looking for a little help. [/snip] Have you tried a PEAR mailing list? http://pear.php.net/support/lists.php Agreed... some of us on this list use PEAR, but PEAR developers will often watch the

[PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT']

2005-02-20 Thread Dave
PHP General, The Situation: I would like to be able to specify locations of scripts and files relative to the root directory from which my web site is served. I thought this was what $_SERVER['DOCUMENT_ROOT'] was for. The Problem: When I use $_SERVER['DOCUMENT_ROOT'], it creates a

AW: [PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT']

2005-02-20 Thread Mirco Blitz
Hi, what does echo $imageFile print and what do you do afterwards with it. Probably there is the error. Mit freundlichen Grüßen Mirco Blitz -Ursprüngliche Nachricht- Von: Dave [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 20. Februar 2005 18:15 An: php-general Betreff: [PHP] [NEWBIE

Re: [PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT']

2005-02-20 Thread b1nary Developement Team
What's Up Dave... yeah, regardless of how deep this goes into the servers file structure, it should pull out the same thing in the end. Please print out the response and let us know what happens. Dave wrote: PHP General, The Situation: I would like to be able to specify locations of

Re: [PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT']

2005-02-20 Thread Andre Dubuc
On Sunday 20 February 2005 12:15 pm, Dave wrote: PHP General, The Situation: I would like to be able to specify locations of scripts and files relative to the root directory from which my web site is served. I thought this was what $_SERVER['DOCUMENT_ROOT'] was for. The

Re: [PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT']

2005-02-20 Thread Dave
Andre, Mirco, BDT, Thank you for your responses. Here is some test code ?php echo img src=\inline/topimage.jpg\ ; echo img src=\/inline/topimage.jpg\ ; echo img src=\ . $_SERVER['DOCUMENT_ROOT'] . /inline/topimage.jpg\ ; ?: Theoretically, they should all output the same image. However: img

Re: [PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT']

2005-02-20 Thread John Nichel
Dave wrote: Here is some test code ?php echo img src=\inline/topimage.jpg\ ; echo img src=\/inline/topimage.jpg\ ; echo img src=\ . $_SERVER['DOCUMENT_ROOT'] . /inline/topimage.jpg\ ; ?: Theoretically, they should all output the same image. However: img src=inline/topimage.jpg -IMAGE DISPLAYS

Re: [PHP] [NEWBIE] Confused about usage of $_SERVER['DOCUMENT_ROOT']

2005-02-20 Thread b1nary Developement Team
Okay, for that last possibility, the one that you used the document root variable. You have to add your domain name before, the reason being is because it's relative to where the script is, if you add the domain name (http://www.whatever.org/document/root) then it switches from relative to

[PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread David Freedman
I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!) data to this script:

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread John Nichel
David Freedman wrote: I have this simple form file: html head /head body form action=test.php method=post Name: input type=text name=name value=your name /br/ Age: input type=text name=age value=your age /br/ input type=submit name=submit value=submit / /form /body /html Which passes (I wish!)

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread b1nary Developement Team
What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those periods do is simply append them to each other, so in this case, you have the

RE: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread eatc7402
3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old!); What those

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread b1nary Developement Team
, which is my problem. The darn $_POST thing does not work at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread Andre Dubuc
, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command to this: print(Hello, . $name . ! You are . $age . years old

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread John Nichel
dbfreedman wrote: I am so new I don't know what you mean by 'test.php David Please reply to the list...better chance of finding the answer to your problem that way. You have the action of your form set to 'test.php', i.e. you should have a file in the same directory as your form called

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread Randy Johnson
Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your change your print command

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread The Disguised Jedi
Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't see any errors, but try this anyways. In your

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread Randy Johnson
at all for me, and I am trying to find out why. -Original Message- From: b1nary Developement Team [mailto:[EMAIL PROTECTED] Sent: Sunday, February 20, 2005 3:40 PM To: David Freedman; php Subject: Re: [PHP] [NEWBIE] Cant get $_POST to work What's up David... This script *should* work... I don't

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread b1nary Developement Team
That's it right there... Damn, why didn't I think of that. Hey David, what version of php are you running? Randy Johnson wrote: try $HTTP_POST_VARS maybe it is an older version of PHP Randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread John Nichel
The Disguised Jedi wrote: i think you have to use the ID parameter in the input tag in your HTML Name: input type=text name=name value=your name id=name /br/ Age: input type=text name=age value=your age id=age /br/ try that and see how it goes If I'm not mistaken, ID in a form element will

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread John Nichel
Randy Johnson wrote: try $HTTP_POST_VARS maybe it is an older version of PHP Randy Good catch. -- By-Tor.com ...it's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] [NEWBIE] Cant get $_POST to work

2005-02-20 Thread The Disguised Jedi
Well, I guess I was wrong...I looked it up and that is correct...I couldn't remember which was the one that was needed to get the params in the right spot. -- The Disguised Jedi [EMAIL PROTECTED] Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm already internationally

[PHP] Newbie question

2005-02-18 Thread Adams, Tom
Does anyone know how to force PHP to require all local variables to be declared prior to use or if this is even possible? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie question

2005-02-18 Thread Adrian
error_reporting(E_ALL); Then you will get a notice when you try to read a variable which doesn't exist. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Dave
PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no time should there ever be more than about 5 email addresses collected from the database. I want all

RE: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Warren Vail
[mailto:[EMAIL PROTECTED] Sent: Tuesday, February 15, 2005 7:37 AM To: php-general Subject: [PHP] [NEWBIE] Trying to combine array into one string PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Matt M.
The Problem: I can't quite figure out how to take the results of the mysql_query() and assemble them into a string. In my experiments so far, I either get a mysql_data_seek(): Offset 0 is invalid for MySQL result index error, or my mail function sends to a blank address. no guarantee

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Gareth Williams
Use implode: http://nl2.php.net/manual/en/function.implode.php On 15 Feb 2005, at 16:37, Dave wrote: PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no

RE: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Chris W. Parker
Dave mailto:[EMAIL PROTECTED] on Tuesday, February 15, 2005 7:37 AM said: The Problem: I can't quite figure out how to take the results of the mysql_query() and assemble them into a string. In my experiments so far, I either get a mysql_data_seek(): Offset 0 is invalid for MySQL

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Leif Gregory
Hello Dave, Tuesday, February 15, 2005, 8:37:02 AM, you wrote: D while ($tantoData = mysql_fetch_array($tantoResult)) D { D $tantoEmail = $tantoEmail . , . $tantoData; D } D mail($tantoEmail, $subject, $mailcontent, $addHeaders); Everything looked good up to here.

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Jochem Maas
Dave wrote: PHP General, The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no time should there ever be more than about 5 email addresses collected from the database. I

Re: [PHP] [NEWBIE] Trying to combine array into one string

2005-02-15 Thread Richard Lynch
Dave wrote: The Situation: I'm retrieving some email addresses from a database. I want to be able assemble all the addresses into one string that I can use in the mail() command. At no time should there ever be more than about 5 email addresses collected from the database. I want all

Re: [PHP] [NEWBIE] Trying to combine array into one string [SOLVED]

2005-02-15 Thread Dave
Matt, Warren, Gareth, Chris, Jochem, Ospinto, Richard, Thank you all for your helpful suggestions. implode() is the command I needed, and I've applied syntax similar to Matt's suggestion. My problem is now solved. Your responses are all much appreciated. -- Dave Gutteridge [EMAIL

[PHP] newbie question regarding forms and drop down list

2005-02-03 Thread Max Krone
I am pretty new to php, so if I am asking a poor question, please forgive me. I have a few input forms using html and php that will take input from text boxes and then put that input into a MySql database. All of the information for the form is put in between a form method element. When I try to

Re: [PHP] newbie question regarding forms and drop down list

2005-02-03 Thread W Luke
On Thu, 3 Feb 2005 15:45:51 -0800, Max Krone [EMAIL PROTECTED] wrote: I assume I am just missing something dumb. Could someone please enlighten me. I can post my code if it will help. Code please, Max! -- Will The Corridor of Uncertainty http://www.cricket.mailliw.com/ - Sanity is a

[PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Sagaert Johan
can i use this kind of construction in my html code ? a href=test.php?selection=highSelect high/a if yes , how do i retrieve the passed string in the php code Johan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

AW: [PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Mirco Blitz
: Mittwoch, 2. Februar 2005 11:38 An: php-general@lists.php.net Betreff: [PHP] newbie question ; calling php script with parrameters from html can i use this kind of construction in my html code ? a href=test.php?selection=highSelect high/a if yes , how do i retrieve the passed string in the php

RE: [PHP] newbie question ; calling php script with parrameters from html

2005-02-02 Thread Chris W. Parker
Sagaert Johan mailto:[EMAIL PROTECTED] on Wednesday, February 02, 2005 2:38 AM said: can i use this kind of construction in my html code ? a href=test.php?selection=highSelect high/a Yes. if yes , how do i retrieve the passed string in the php code ?php $value =

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-28 Thread Dave
all, a PHP newbie. But I should mention that the script works perfectly when I use this syntax: if( copy($HTTP_POST_FILES['upfile']['tmp_name'],$store_dir. imagefile.jpg) However, I wanted to change it to use move_uploaded_file() instead of copy() because Marek suggested it would

Re: [PHP] [NEWBIE] Trying to create a function from an existing script [SOLVED]

2005-01-28 Thread Dave
Jon and all, Please disregard my posting just before this. After a night's sleep and looking at my code with fresh eyes, I noticed that I had an extra under bar character in my $HTTP_POST_FILES variable which was causing all the trouble. The script is now working perfectly. Thanks

[PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
PHP List, The Situation: I'm trying to make a page where users can upload an image. I've located on the internet a script that is simple enough for me to use, and I can build upon it to customize for my needs. The script as it is on the web site I got it from is a stand alone .php file

RE: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Mike Johnson
From: Dave [mailto:[EMAIL PROTECTED] The Problem: I'm not able to create the right syntax to pass the $HTTP_POST_FILES variable to the function. So the function gets called, but then it stops very early because what I end up giving it is essentially an empty array, so it thinks

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Marek Kilimajer
Dave wrote: PHP List, The Situation: I'm trying to make a page where users can upload an image. I've located on the internet a script that is simple enough for me to use, and I can build upon it to customize for my needs. The script as it is on the web site I got it from is a stand

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
Marek, Mark, Thanks for the advice. I've added global $HTTP_POST_FILES; into my function, and it is working. I'd also like to follow Marek's advice to modify my script, as it sounds like it helps to make it more secure. However, I don't think I'm using the syntax right. I changed: if(

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Josip Dzolonga
On Fri, 2005-01-28 at 14:41 +0900, Dave wrote: if ( move_uploaded_file($HTTP_POST_FILES[$name]['tmp_name'], $store_dir . basename($HTTP_POST_FILES[$name]['name']) ) Try echoing $store_dir . basename($HTTP_POST_FILES[$name]['name'] before uploading the file (before the move_uploaded_file

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
basename is looking for a file and $HTTP_POST_FILES[$name]['name'] is not a valid path to a file. Something like this should work if(move_uploaded_file($_HTTP_POST_FILES['upfile']['tmp_name'], rawurlencode($store_dir.$HTTP_POST_FILES['upfile']['name'])) On Fri, 2005-01-28 at 14:41 +0900, Dave

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Dave
Jon, Thanks for responding. Unfortunately, it still doesn't work. I tried it exactly as you wrote, and it still gives me the message that it failed to upload. Also, I actually want to force a name change to the file, so that regardless of what the name of the file uploaded is, it gets

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
Dave, Does $store_dir end with a slash? Is it writable by apache? What do your log files reveal? What is the output of the script? On Fri, 2005-01-28 at 15:18 +0900, Dave wrote: Jon, Thanks for responding. Unfortunately, it still doesn't work. I tried it exactly as you wrote,

Re: [PHP] [NEWBIE] Trying to create a function from an existing script

2005-01-27 Thread Jon
Dave, Another quick note. If you are using this in a function with register_globals off in you php.conf you will need to do global $_HTTP_POST_FILES or use $_FILES['upfile']['temp_name'] instead. On Fri, 2005-01-28 at 15:18 +0900, Dave wrote: Jon, Thanks for responding. Unfortunately, it

[PHP] [NEWBIE GUIDE] For the benefit of new members

2005-01-25 Thread Jay Blanchard
= Please feel free to add more points and send to the list. = 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it

[PHP] newbie.. $_GET $_POST

2005-01-03 Thread Pablo D Marotta
Hi there.. I need to pass variables to a page through an html link. I do it like this: A href=Extra/excelListing3.php?buildQuery=?php echo $buildQuery ?Export/A where 'buildQuery' is the variable I´m passing. In the destination page, I capture it with $_GET and that´s it. I want to know if

[PHP] newbie.. $_GET $_POST

2005-01-03 Thread Pablo D Marotta
Hi there.. I need to pass variables to a page through an html link. I do it like this: A href=Extra/excelListing3.php?buildQuery=?php echo $buildQuery ?Export/A where 'buildQuery' is the variable I´m passing. In the destination page, I capture it with $_GET and that´s it. I want to know if

Re: [PHP] newbie.. $_GET $_POST

2005-01-03 Thread John Nichel
Pablo D Marotta wrote: Hi there.. I need to pass variables to a page through an html link. I do it like this: A href=Extra/excelListing3.php?buildQuery=?php echo $buildQuery ?Export/A where 'buildQuery' is the variable I´m passing. In the destination page, I capture it with $_GET and that´s it. I

Re: [PHP] newbie.. $_GET $_POST

2005-01-03 Thread Robby Russell
On Mon, 2005-01-03 at 10:54 -0300, Pablo D Marotta wrote: Hi there.. I need to pass variables to a page through an html link. I do it like this: A href=Extra/excelListing3.php?buildQuery=?php echo $buildQuery ?Export/A where 'buildQuery' is the variable Im passing. In the destination

Re: [PHP] newbie.. $_GET $_POST

2005-01-03 Thread Richard Lynch
Pablo D Marotta wrote: Hi there.. I need to pass variables to a page through an html link. I do it like this: A href=Extra/excelListing3.php?buildQuery=?php echo $buildQuery ?Export/A where 'buildQuery' is the variable I´m passing. In the destination page, I capture it with $_GET and

Re: [PHP] newbie.. $_GET $_POST

2005-01-03 Thread The Disguised Jedi
Yes, very true. When dealing with externally provided data in your script, always assume first that data is tainted, and make sure it isn't before you try to do anything with it. Follow Richard Greg's advice on checking your data. You could also use some kind of priveleged authentication

Re: [PHP] Newbie, easy question...

2004-12-22 Thread Richard Lynch
GaryH wrote: Below is a simple php file that recieves input from a form html file. The php file outputs the first and last name, but their is no space between the names. Does anyone know how I can get a space between name in the php file? But there *IS* a space between them. You put a

[PHP] Newbie question? diagnosing a script

2004-12-22 Thread Al Guevara
Hi Yall! I dont know if Im goin overboard askin this, but here goes... What /how does one use to diagnose a php script (for a link exchange) as to why it wont work/write to the file? With Cgi, one can use a telnet shell.. is there a thing to use for diagnosing php? Thank Mucho submit

Re: [PHP] Newbie question? diagnosing a script

2004-12-22 Thread Richard Lynch
Al Guevara wrote: I dont know if Im goin overboard askin this, but here goes... What /how does one use to diagnose a php script (for a link exchange) as to why it wont work/write to the file? With Cgi, one can use a telnet shell.. is there a thing to use for diagnosing php? Perhaps

[PHP] Newbie, easy question...

2004-12-21 Thread GaryH
Below is a simple php file that recieves input from a form html file. The php file outputs the first and last name, but their is no space between the names. Does anyone know how I can get a space between name in the php file? TIA, Gary html head titleHi User/title /head body h3PHP program that

Re: [PHP] Newbie, project..

2004-12-03 Thread Brent Baisley
My advice is to pick a project that will be useful to you and ideally to some people you know, perhaps your friends or family. A little side project I just started is a wine log. I've been getting into wine lately and so have some of my friends. We have no way of tracking and rating what we

[PHP] Newbie, project..

2004-12-02 Thread Lennart Andersen
Hi All, I need to find a newbie project to help me learn PHP, I use Linux and have apache install with php support! Any suggestions? -- Lennart Andersen St Thomas, Ontario lennart at rogers dot com -- - Debian - I hack, therefore I am -- PHP General

Re: [PHP] Newbie, project..

2004-12-02 Thread Robert Sossomon
SNIP Write a guestbook for your website. :) My first project for PHP was a custom shopping cart for my old company(ies) and I had to write it from the ground up. Ambitious and I am sure my code is full of non-speedy stuff, but it works and still functions (for me anyways, they got rid of a

[PHP] Newbie question

2004-11-28 Thread Pascal Platteeuw
Hello everyone, Here is a newbie question for you guys who are much more advanced than me :-) I want ot do an automatic redirection in a php page... Is there something equivalent to response.redirect used in ASP? Thanks in advance, Pascal Platteeuw -- PHP General Mailing List

RE: [PHP] Newbie question

2004-11-28 Thread Mike
Look at header() http://us2.php.net/manual/en/function.header.php -M -Original Message- From: Pascal Platteeuw [mailto:[EMAIL PROTECTED] Sent: Sunday, November 28, 2004 11:34 AM To: [EMAIL PROTECTED] Subject: [PHP] Newbie question Hello everyone, Here is a newbie question

Re: [PHP] Newbie question

2004-11-28 Thread John Nichel
Pascal Platteeuw wrote: Hello everyone, Here is a newbie question for you guys who are much more advanced than me :-) I want ot do an automatic redirection in a php page... Is there something equivalent to response.redirect used in ASP? Thanks in advance, Pascal Platteeuw http://us4.php.net/header

[PHP] newbie web services

2004-11-28 Thread Andras Kende
Hello, I want to create a simple web service. So far tried NuSoap but don't know how to modify its default xml envelope.. I could create REST for response but not sure about how to process the request, maybe with simplexml ? RAW DATA: Request: XML ID5/ID /XML Response: XML NAMEJones/NAME /XML

Re: [PHP] newbie question

2004-11-15 Thread Richard Davey
Hello Max, Monday, November 15, 2004, 6:26:43 PM, you wrote: MK } else if ($_POST[FirstName] != ) { Where you use $_POST you should have the syntax as follows: $_POST['var'] (note the quote marks) Without them, PHP is going to think you're passing in a constant called FirstName (etc) which

[PHP] newbie question

2004-11-15 Thread Max Krone
Hello all, I am new to php programming and web programming in general. I have created a php file that if it works will create a simple form for inputing contact information and then once the submit button is pressed, the information is saved into a MySQL database. When I try to submit, I get no

RE: [PHP] newbie question

2004-11-15 Thread Chris W. Parker
Greg Donald mailto:[EMAIL PROTECTED] on Monday, November 15, 2004 11:08 AM said: ?php if ($_POST[FirstName] == ) { $display_block = h1Add an Entry/h1 form method=\post\ action=\$_SERVER[PHP_SELF]\ PstrongFirst/Last Names:/strongbr input type=\text\

Re: [PHP] newbie question

2004-11-15 Thread Greg Donald
On Mon, 15 Nov 2004 10:26:43 -0800, Max Krone [EMAIL PROTECTED] wrote: When I try to submit, I get no error messages, but no data goes into the MySQL table. I have verified that my MySQL User and Password are correct and I believe I am actually connecting to the database. Please look at what

[PHP] newbie: string to char array

2004-11-10 Thread Horst Jäger
Hi, I wonder if it is possible to convert a given string into an array of chars without using a separator. That is, is there a function mySplit with mySplit('example') == array('e', 'x', 'a', 'm', 'p' 'l' 'e') ? Thanks Horst Horst Jäger Schaafenstr. 25 50676 Köln Tel: 0221/93187015 -- PHP

Re: [PHP] newbie: string to char array

2004-11-10 Thread Marek Kilimajer
Horst Jäger wrote: Hi, I wonder if it is possible to convert a given string into an array of chars without using a separator. That is, is there a function mySplit with mySplit('example') == array('e', 'x', 'a', 'm', 'p' 'l' 'e') ? $chars_array = preg_split('//', 'example', -1,

RE: [PHP] newbie: string to char array

2004-11-10 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -Original Message- From: Horst Jäger [mailto:[EMAIL PROTECTED] Sent: 10 November 2004 09:51 I wonder if it is possible to convert a given string into an array of

Re: [PHP] newbie: string to char array

2004-11-10 Thread raditha dissanayake
Ford, Mike wrote: To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm are you in a position to impose any terms (not that i have visited your link) on an email that get's distributed to thousands of readers, get's archived on

RE: [PHP] newbie: string to char array

2004-11-10 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 10 November 2004 13:37, Horst Jäger wrote: (Please keep this on list -- others may be able to help better/faster than me!) mySplit('example') == array('e', 'x', 'a', 'm',

RE: [PHP] newbie: string to char array

2004-11-10 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 10 November 2004 16:19, raditha dissanayake wrote: Ford, Mike wrote: To view the terms under which this email is distributed, please go to

Re: [PHP] newbie: string to char array

2004-11-10 Thread Thomas Goyne
On Wed, 10 Nov 2004 15:56:28 -, Ford, Mike [EMAIL PROTECTED] wrote: On 10 November 2004 13:37, Horst Jger wrote: (Please keep this on list -- others may be able to help better/faster than me!) I am thinking about complexity. How is a string implemented in PHP? A dequechar or a char* ?

[PHP] Newbie pattern question

2004-11-05 Thread Phpu
Hi, I have this function function validate_name($name) { if(ereg(^[a-zA-Z0-9_]{2,30}$, $name)) { return true; } else { return false; } } If i enter a name like John for exemple everything is ok but if i enter John Doe the function return false. Where is the problem? Thanks

Re: [PHP] Newbie pattern question

2004-11-05 Thread Greg Donald
On Fri, 5 Nov 2004 20:55:00 +0200, Phpu [EMAIL PROTECTED] wrote: if(ereg(^[a-zA-Z0-9_]{2,30}$, $name)) { if(ereg(^[a-zA-Z0-9_\ ]{2,30}$, $name)) { Need to allow spaces in the regular expression. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP

Re: [PHP] Newbie pattern question

2004-11-05 Thread Frantzcy Paisible
Hi, Try adding a space([a-zA-Z0-9_] = [a-zA-Z0-9_ ]), John Doe is false but JohnDoe would be true in the case below Frantzcy On Fri, 5 Nov 2004 20:55:00 +0200,Phpu [EMAIL PROTECTED] wrote: Hi, I have this function function validate_name($name) { if(ereg(^[a-zA-Z0-9_]{2,30}$,

Re: [PHP] Newbie pattern question

2004-11-05 Thread -{ Rene Brehmer }-
At 19:59 05-11-2004, Greg Donald wrote: On Fri, 5 Nov 2004 20:55:00 +0200, Phpu [EMAIL PROTECTED] wrote: if(ereg(^[a-zA-Z0-9_]{2,30}$, $name)) { if(ereg(^[a-zA-Z0-9_\ ]{2,30}$, $name)) { If you use ereg, use [[:blank:]] instead of an actual space, that allows for tabs and other variants too

<    2   3   4   5   6   7   8   9   10   11   >