Re: Fwd: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread A.a.k
Hello Richard, that is exactly what I was looking for. thanks alot Paul, I didn't know its possible to use error_reporting(), that's a good hint thanks. btw if you guys know any simple php application that I can study and learn faster than going through books please let me know. I tried Wordpres

Re: Fwd: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread Paul M Foster
On Mon, Jul 27, 2009 at 09:01:16PM -0700, Richard S. Crawford wrote: > >> > >> username : > >> password : > >> > >> > >> > >> >> $user=$_POST['user']; > >> $pass=$_POST['pass']; > >> if(($user=="myname")&&($pass="mypass")) > >> echo "access granted"; > >> else > >> echo "access denied"; > >

Fwd: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread Richard S. Crawford
>> >> username : >> password : >> >> >> >> > $user=$_POST['user']; >> $pass=$_POST['pass']; >> if(($user=="myname")&&($pass="mypass")) >> echo "access granted"; >> else >> echo "access denied"; >> ?> >> >> getting "Notice: Undefined index: user" and "Notice: Undefined index: pass". >> changin

Re: [PHP] newbie: problem with $_Post[]

2009-07-27 Thread Bastien Koert
On Mon, Jul 27, 2009 at 10:31 PM, A.a.k wrote: > Hello > I have a very simple test form named "pass.php"  : > > > username : > password : > > > > $user=$_POST['user']; > $pass=$_POST['pass']; > if(($user=="myname")&&($pass="mypass")) > echo "access granted"; > else > echo "access denied"; >

[PHP] newbie: problem with $_Post[]

2009-07-27 Thread A.a.k
Hello I have a very simple test form named "pass.php" : username : password : getting "Notice: Undefined index: user" and "Notice: Undefined index: pass". changing form action to another page will solve the problem but i want to be able to use $_POST array on the same page, how can i d

Re: [PHP] Newbie problem: Php script not running in browser.

2008-08-06 Thread V S Rawat
Cell: +91 94033 66714 | Tel: +91 (0832) 30 79014 Innovation in software product design, development and delivery- www.persistentsys.com -Original Message- From: V S Rawat [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 7:22 PM To: Chetan Rane Subject: Re: [PHP] Newbie prob

Re: [PHP] Newbie problem: Php script not running in browser.

2008-08-06 Thread V S Rawat
PM To: php-general@lists.php.net Subject: Re: [PHP] Newbie problem: Php script not running in browser. On 8/6/2008 2:58 AM India Time, _Andrew Ballard_ wrote: On Tue, Aug 5, 2008 at 3:05 PM, V S Rawat <[EMAIL PROTECTED]> wrote: I have put the first php script to hello.php file:

RE: [PHP] Newbie problem: Php script not running in browser.

2008-08-06 Thread Chetan Rane
Message- From: V S Rawat [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2008 7:22 PM To: Chetan Rane Subject: Re: [PHP] Newbie problem: Php script not running in browser. On 8/6/2008 4:20 PM India Time, _Chetan Rane_ wrote: > Hi > > You need to check if your Apache is up and r

RE: [PHP] Newbie problem: Php script not running in browser.

2008-08-06 Thread Chetan Rane
et Subject: Re: [PHP] Newbie problem: Php script not running in browser. On 8/6/2008 2:58 AM India Time, _Andrew Ballard_ wrote: > On Tue, Aug 5, 2008 at 3:05 PM, V S Rawat <[EMAIL PROTECTED]> wrote: >> I have put the first php script to hello.php file: >> >> >>

Re: [PHP] Newbie problem: Php script not running in browser.

2008-08-06 Thread V S Rawat
On 8/6/2008 2:58 AM India Time, _Andrew Ballard_ wrote: On Tue, Aug 5, 2008 at 3:05 PM, V S Rawat <[EMAIL PROTECTED]> wrote: I have put the first php script to hello.php file: PHP Test Hello World'; ?> I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL 5.0.51b

Re: [PHP] Newbie problem: Php script not running in browser.

2008-08-05 Thread Andrew Ballard
On Tue, Aug 5, 2008 at 3:05 PM, V S Rawat <[EMAIL PROTECTED]> wrote: > I have put the first php script to hello.php file: > > > > PHP Test > > > Hello World'; ?> > > > > I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL 5.0.51b > > http://localhost/ is E:\wamp\www >

[PHP] Newbie problem: Php script not running in browser.

2008-08-05 Thread V S Rawat
I have put the first php script to hello.php file: PHP Test Hello World'; ?> I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL 5.0.51b http://localhost/ is E:\wamp\www I put the hello.php file to E:\wamp\www. drag/dropping it to browser shows the above sou

Re: [PHP] newbie problem - extraneous newlines inserted in PHP-generated HTML form source

2006-11-22 Thread Mark White
Thanks to Richard Lynch and Edward Kay for their help. The var_dump() showed unwanted whitespace appearing in the array data from record 2 onwards. The trim() worked a treat to get rid of it. Now all I have to do is work out what's wrong with my original handler functions that caused the pr

Re: [PHP] newbie problem

2006-02-21 Thread Richard Lynch
On Mon, February 20, 2006 1:14 pm, Robert Voogdgeert wrote: > When working with an HTML file with a form with > > > > the somename.php file is served (completely) to my browser as plain > text > after the 'submit' button is clicked on my machine (MacOS X). On the > external webhost though ever

RE: [PHP] newbie problem [SOLVED]

2006-02-21 Thread Jay Blanchard
[snip] > Have you installed PHP on the localhost and is it running properly? Jay (and others), I solved the problem. I need to use 10.0.1.3/somedir/somedir/somefile.html and not localhost/somedir/somedir/somefile.html, something I don't understand (probably because of lack of knowled

RE: [PHP] newbie problem [SOLVED]

2006-02-21 Thread Robert Voogdgeert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Have you installed PHP on the localhost and is it running properly? Jay (and others), I solved the problem. I need to use 10.0.1.3/somedir/somedir/somefile.html and not localhost/somedir/somedir/somefile.html, something I don't underst

Re: [PHP] newbie problem

2006-02-21 Thread tedd
Hi all, I have a page that lets people upload images - they are then resized for use throughout my site. It all works fine, but I need to reduce the jpg size (without reducing image size) Is there a php function that lets you compress the jpg? Thanks Jules No -- my understanding is that

RE: [PHP] newbie problem

2006-02-21 Thread Jay Blanchard
[snip] > [snip] > When working with an HTML file with a form with > > > > the somename.php file is served (completely) to my browser as plain text > after the 'submit' button is clicked on my machine (MacOS X). On the > external webhost though everything is processed correctly... > > Is

Re: [PHP] newbie problem

2006-02-20 Thread julian haffegee
Hi all, I have a page that lets people upload images - they are then resized for use throughout my site. It all works fine, but I need to reduce the jpg size (without reducing image size) Is there a php function that lets you compress the jpg? Thanks Jules -- PHP General Mailing List (

Re: [PHP] newbie problem

2006-02-20 Thread Ray Hauge
On Monday 20 February 2006 15:32, Robert Voogdgeert wrote: > > Robert Voogdgeert wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > Dear php-users, > > > > > > > > > When working with an HTML file with a form with > > > > > > > > > > > > the somename.php file is serve

Re: [PHP] newbie problem

2006-02-20 Thread Robert Voogdgeert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Robert Voogdgeert wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Dear php-users, > > > > > > When working with an HTML file with a form with > > > > > > > > the somename.php file is served (completely) to my browse

Re: [PHP] newbie problem

2006-02-20 Thread John Nichel
Robert Voogdgeert wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear php-users, When working with an HTML file with a form with the somename.php file is served (completely) to my browser as plain text after the 'submit' button is clicked on my machine (MacOS X). On the exter

RE: [PHP] newbie problem

2006-02-20 Thread Jay Blanchard
[snip] When working with an HTML file with a form with the somename.php file is served (completely) to my browser as plain text after the 'submit' button is clicked on my machine (MacOS X). On the external webhost though everything is processed correctly... Is this related to some setti

[PHP] newbie problem

2006-02-20 Thread Robert Voogdgeert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear php-users, When working with an HTML file with a form with the somename.php file is served (completely) to my browser as plain text after the 'submit' button is clicked on my machine (MacOS X). On the external webhost though everythin

Re: [PHP] Newbie Problem with an IF Statement

2003-03-05 Thread Leif K-Brooks
What the heck? The string "[status]='active'" doesn't check anything. It is converted to boolean by the if statment, which will be true, as it's not an empty string. I'm guessing you want to use if($status=='active'){ Hunter, Jess wrote: I have a short bit of code that contains an if/else th

[PHP] Newbie Problem with an IF Statement

2003-03-05 Thread Hunter, Jess
I have a short bit of code that contains an if/else that is causing me some trouble, I am sure that the answer is staring me straight in the face, and I am not seeing it. Can someone take a look and see where I am coding wrong? if ("[status]='active'"){ print ("the active line\n"); } else { pri

RE: [PHP] Newbie problem - Slashes

2002-06-27 Thread John Holmes
Show us your code. ---John Holmes... > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 27, 2002 5:33 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED] > Subject: Re: [PHP] Newbie problem - Slashes >

Re: [PHP] Newbie problem - Slashes

2002-06-27 Thread Nookie
Hi, Maybe mysql_escape_string($string) helps? Greetings, Nookie - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 27, 2002 11:32 PM Subject: Re: [PHP] Newbie problem - Slash

Re: [PHP] Newbie problem - Slashes

2002-06-27 Thread kim
Hi John,Phillip, Thanks for writing. > You're fault. :) Guessed as much. :-) I know quotes are used for the beginning and end of a string,but i'm thinking what if a user "accidently" puts in a double quote.maybe as a typo error? The part I cannot understand is why is the MySql database's

Re: [PHP] Newbie problem - Slashes

2002-06-27 Thread 1LT John W. Holmes
: <[EMAIL PROTECTED]> Sent: Thursday, June 27, 2002 4:59 PM Subject: [PHP] Newbie problem - Slashes > > Hello all, > I'm a newbie into PHP and am facing a funny problem. > > I have a form with a textarea named address, > I am able to submit the form and enter the da

[PHP] Newbie problem - Slashes

2002-06-27 Thread kim
Hello all, I'm a newbie into PHP and am facing a funny problem. I have a form with a textarea named address, I am able to submit the form and enter the data into the database without any problem,but to make sure that it handles "bad" data too I tested it out with this sentance: When cheese g

RE: [PHP] Newbie problem with POST vars

2002-06-13 Thread Sear, Mick
print_r($_POST); shows all the elements in the array as I expect them to be. That foreach loop is only picking the first element, though. At least it's reassured me that I'm not going mad, though, so thanks for that. Mick > I've tried this, but it's still doing the same thing. Is there somethi

RE: [PHP] Newbie problem with POST vars

2002-06-13 Thread Ford, Mike [LSS]
> -Original Message- > From: Remy Dufour [mailto:[EMAIL PROTECTED]] > Sent: 13 June 2002 14:34 > > If you do this, it should work > > function foo() > { > global $_POST; That's unnecessary -- the $_ arrays are automatically global ("superglobal"). > reset($_POST); That's unnec

Re: [PHP] Newbie problem with POST vars

2002-06-13 Thread Remy Dufour
If you do this, it should work function foo() { global $_POST; reset($_POST); foreach($_POST as $item => $value){ echo "$item, $value"; } } Thats work for me. > I've tried this, but it's still doing the same thing. Is there something > special about this particular var

Re: [PHP] Newbie problem with POST vars

2002-06-13 Thread Jason Wong
On Thursday 13 June 2002 21:16, Sear, Mick wrote: > I've tried this, but it's still doing the same thing. Is there something > special about this particular variable that I need to know? I've tried it > with $HTTP_POST_VARS as well, declaring $HTTP_POST_VARS as global in the > function first. >

Re: [PHP] Newbie problem with POST vars

2002-06-13 Thread Sear, Mick
I've tried this, but it's still doing the same thing. Is there something special about this particular variable that I need to know? I've tried it with $HTTP_POST_VARS as well, declaring $HTTP_POST_VARS as global in the function first. Put reset($_POST) before foreach loop > I'

Re: [PHP] Newbie problem with POST vars

2002-06-13 Thread Remy Dufour
Put reset($_POST) before foreach loop > I'm trying to loop through $_POST vars in a function, which I understand to > be an autoglobal associative array. Here's the code I'm using: > > foreach($_POST as $item => $value){ > echo "$item, $value"; > } > > However, I only get the first element of th

[PHP] Newbie problem with POST vars

2002-06-13 Thread Sear, Mick
Sorry if this is a bit simple: I'm trying to loop through $_POST vars in a function, which I understand to be an autoglobal associative array. Here's the code I'm using: foreach($_POST as $item => $value){ echo "$item, $value"; } However, I only get the first element of the array echoe

Re: [PHP] newbie problem under Solaris

2002-04-30 Thread Billy S Halsey
Buon giorno, Emiliano, Do you have root access to the system? If so, try downloading the gcc package from http://www.sunfreeware.com/. Installing it in package format should make everything work for you. Also make sure that your LD_LIBRARY_PATH contains the correct locations (such as /usr/loca

[PHP] newbie problem under Solaris

2002-04-30 Thread Emiliano Marmonti
Hi people, I know there is a lot of material about it. I´m installing PHP under Solaris 8 and obtain the message that gcc cannot create executables. I know that gcc has libraries that are not installed by default under Solaris. If I download a version of gcc newer and complete will I pass this

RE: [PHP] newbie problem: Hit counter.

2001-03-15 Thread Boaz Yahav
Subject: [PHP] newbie problem: Hit counter. For some reason the number of hits value is not getting replaced [after incrementing] into the original counter file. any help would be appreciated. here is the code : "; } fclose ($rs); $wr = fopen ($cntfile, "rw");

[PHP] newbie problem: Hit counter.

2001-03-15 Thread Richard Banks
For some reason the number of hits value is not getting replaced [after incrementing] into the original counter file. any help would be appreciated. here is the code : "; } fclose ($rs); $wr = fopen ($cntfile, "rw"); $cntr+=1; fputs($wr, $cntr); echo $cntr; fclose(