[PHP-WIN] doubt

2004-07-19 Thread PHP MySQL
Is this the address where i send my queries regarding any problems faced with php.
 
Please help
thanks,
penjo

Yahoo! India Careers: Over 65,000 jobsonline.

[PHP-WIN] php installation problem

2004-07-28 Thread PHP MySQL
Hello list,
While installing phpafter i have configured everything, i am not able to get php 
running. While trying to run a test page consisting of the code:

 
I get a dialog box saying that "You have chosen to download a file from this 
location". Upon opening the file, i get the whole code and not just "Hello".
 
   Please can you tell me what went wrong. I am using PHP 4.3.4, Apache 1.3.2. and 
Windows 2000.
 
Also can u please tell me how do u know that php has been installed in my PC. While 
double clicking php.exe, a window gets opened and nothing seems to happen with it. We 
have to close it manually. Is it unusual or is it supposed to be like that only. 
Please help.
 
Thanks in advance,
penjo

Yahoo! India Matrimony: Find your life partneronline.

[PHP-WIN] form to php

2004-07-29 Thread PHP MySQL
hi list,
 
  i have managed to successfully install php and i am now going through the manual and 
trying a few of the examples given there. The examples i have tried till now are all 
working except for one. The example about inputting in the form and then displaying it 
through php is not working for me. But when i run it i get the entire code in 
action.php instead.
The example i am referring to is:

form action="action.php" method="post"> Your name:  Your age:  .You are  

 

Please tell me whts wrong

thanks in advance

penjo

Yahoo! India Matrimony: Find your life partneronline.

RE: [PHP-WIN] form to php

2004-07-29 Thread PHP MySQL
hi,
 
1) The lines in the form are in the correct order.
2)i tried using HTTP_POST['age']; ?> , but it still displays the entire code.
Not quite sure wht u meant by "AUTOGLOBAL ON|OFF setting". If u meant 
register_globals in php.ini file, then it is set to on.
 
3) Regarding action.php:
phpinfo(); 
?>
It still only displays the code.
I ran action.php by itself and looked at the info page and i couldnot any entries for 
$HTTP_POST['name'] or $ _POST['name'] or
$HTTP_POST['age'] or $_POST['age']

Please help.
penjo

grgk2 <[EMAIL PROTECTED]> wrote:
Hi

1) Line " form action="action.php" method="post"> 
Your name:  [input] type="text" name="name" />

Your age:  [input] />

 [input] 

should read

"
Your name:  [input] name="name" />

Your age:  [input] 


 [input] 
"

assuming that is correct

2) Try .You are $HTTP_POST['age']; ?> 

REASON - php.ini - AUTOGLOBAL ON|OFF setting

3) If that doesn't work try

4) action.php:
phpinfo(); 
?>

Try to locate entries for $HTTP_POST['name'] or $ _POST['name'] or
$HTTP_POST['age'] or $_POST['age']

See if they carry any values.

REASON - php.ini - Other settings

And resubmit to the list with your results.

Best regards,
Grgk2


Yahoo! India Matrimony: Find your life partneronline.

Re: [PHP-WIN] form to php

2004-07-29 Thread PHP MySQL
hi,
 
 Yes this is the contents of the file. I tried to use ur code but it still displays 
the entire code and not just the line required.
 
  Any idea wht is wrong. 
thanks,
penjo

Luis Moreira <[EMAIL PROTECTED]> wrote:
Is this the contebnt of the PHP file ?

Hi .You are 

It can not start by the "Hi" word ...

Action.php should be something like

$name = $_POST['name']; 
$age = $_POST['age'];
echo "Hi $name. You are $age";
?> 




PHP MySQL wrote:

>hi list,
> 
> i have managed to successfully install php and i am now going through the manual and 
> trying a few of the examples given there. The examples i have tried till now are all 
> working except for one. The example about inputting in the form and then displaying 
> it through php is not working for me. But when i run it i get the entire code in 
> action.php instead.
>The example i am referring to is:
>
>form action="action.php" method="post"> 
Your name:  [input] 

Your age:  [input] 

 [input] 
>
>action.php:
>
>Hi .You are 
>
> 
>
>Please tell me whts wrong
>
>thanks in advance
>
>penjo
>
>Yahoo! India Matrimony: Find your life partneronline.
> 
>

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Yahoo! India Matrimony: Find your life partneronline.

RE: [PHP-WIN] form to php

2004-07-29 Thread PHP MySQL
Thanks for all ur repliesi have finally got it working. Thanks a lot "grgk2", i 
did exactly as u told me, i.e., executed the form like so: http://localhost 
/form.html. And it worked. I was earlier trying to access it by double clicking on it.
 
Once again, thanks for ur help.

grgk2 <[EMAIL PROTECTED]> wrote:

It’s not a bother, it’s the purpose of the list.

 

Yes. What I meant was that in order for the php script to be parsed it should be 
executed on a web server.

if your html form resides in a file named [form.html], it should be executed like so: 
http://localhost /form.html. if your web server has a different name just use the 
appropriate name…

 

My point being that you should not try to execute any php file just by double clicking 
on it J

 

If you have the following

1)   A web server installed on your machine

2)   Php installed correctly for that WS

 

Then the following script should yield result…

 

[Save as info.php]



[Execute http://localhost/info.php]

 

Mail me the results…

 

 

-Original Message-
From: PHP MySQL [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 1:12 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] form to php

 

1) i have tried with all the HTML structure and it is not displaying the part using 
the php code.


i.e., it is displaying "Hi $name. You are $age".


 


2)) Please tell me how ca i make sure iexecute the file through my localhost server 
(i.e. Apache so that php code will be treated as php code). Do u mean i have to run as 
"http://127.0.0.1/action.php";


 


Sorry for bothering u again and again.


thanks,


grgk2 <[EMAIL PROTECTED]> wrote:


Luis is very correct.

If you see all the source code that means the php code is not parsed as php
code.

1) Make sure you execute the file through you localhost server (i.e. Apache
so that php code will be treated as php code)

2) any html file should conform with the following skeleton structure








Any echoes you need to do should be within the element

As Luis stated this will do 



as well as this



Hoppe that does it...

-Original Message-
From: PHP MySQL [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 29, 2004 12:30 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] form to php

hi,

1) The lines in the form are in the correct order.
2)i tried using HTTP_POST['age']; ?> , but it still displays the entire
code.
Not quite sure wht u meant by "AUTOGLOBAL ON|OFF setting". If u meant
register_globals in php.ini file, then it is set to on.

3) Regarding action.php:
phpinfo(); 
?>
It still only displays the code.
I ran action.php by itself and looked at the info page and i couldnot any
entries for $HTTP_POST['name'] or $ _POST['name'] or
$HTTP_POST['age'] or $_POST['age']

Please help.
penjo

grgk2 wrote:
Hi

1) Line " form action="action.php" method="post"> 
Your name: [input] type="text" name="name" />

Your age: [input] />

[input] 

should read

"
Your name: [input] name="name" />

Your age: [input] 


[input] 
"

assuming that is correct

2) Try .You are $HTTP_POST['age']; ?> 

REASON - php.ini - AUTOGLOBAL ON|OFF setting

3) If that doesn't work try

4) action.php:
phpinfo(); 
?>

Try to locate entries for $HTTP_POST['name'] or $ _POST['name'] or
$HTTP_POST['age'] or $_POST['age']

See if they carry any values.

REASON - php.ini - Other settings

And resubmit to the list with your results.

Best regards,
Grgk2


Yahoo! India Matrimony: Find your life partneronline.

Yahoo! India Matrimony: Find your life partner online.


Yahoo! India Matrimony: Find your life partneronline.

[PHP-WIN] Connecting to a database

2004-08-09 Thread PHP MySQL
hi list,
 
   I am given a task to connect to a database and display the info there onto the Web. 
So that whatever changes are made in the database...my web page will also show the 
newly changed data. I am planning to try doing this using PHP but as i am new to 
php...i don't know how to go about doing this. I am in the process of learning php and 
i am using a book called"Beginning php4". But i was wondering if any of u guys would 
tell me how it could be done and how i should get started in it.
 
I am sorry if the answer is already in the list..i searched through it but couldn't 
get my desired answer.
 
Thanks..
penjo

Yahoo! India Matrimony: Find your life partneronline.

[PHP-WIN] PHP and SQL 2000

2004-08-11 Thread PHP MySQL
hi there,
 
 i have been trying to connect to a sql 2000 server database. I am able to connect 
using the DSN-connection: i.e., the following code works:
";
while (odbc_fetch_row ($process))
{
   $Description = odbc_result($process, "FullDescrp");
   echo "$Description ";
}
odbc_close ($sqlconnect);
?>
 
But when i try to connect to the database using the mssql_ functions like:
";
while ($row = mssql_fetch_array ($result))
{
   echo $row['FullDescrp']."\n";
}
mssql_close ($sqlconnect);
?>
 
It is not getting conencted. The following error is given:
"Warning: mssql_connect(): message: Login failed for user '(null)'. Reason: Not 
associated with a trusted SQL Server connection. (severity 14) in c:\program 
files\apache group\apache\htdocs\btc_test.php on line 8

Warning: mssql_connect(): Unable to connect to server: in c:\program files\apache 
group\apache\htdocs\btc_test.php on line 8

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in 
c:\program files\apache group\apache\htdocs\btc_test.php on line 9
Couldn't open database BACSDB_test"
 
Please help
Any help received will be highly appreciated.
 
thanks
penjo

Yahoo! India Matrimony: Find your life partneronline.

Re: [PHP-WIN] PHP and SQL 2000

2004-08-12 Thread PHP MySQL
hi list,
 
I set mssql.secure_connection = On in php.ini file and my php file is now successfully 
getting connected to the SQL 2000 database.
 
Thank u very much for ur helpspecial thanks to  Frank.
Regards,
penjo

Yahoo! India Matrimony: Find your life partneronline.