Get support from Xavier Media
It is currently Sun Dec 08, 2013 12:24 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: PHP HANDLING FORMS
PostPosted: Thu Feb 12, 2009 7:37 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Thu Feb 12, 2009 6:52 am
Posts: 4
Points: 0
Hi,

I m not able to INVOKE the process.php from test.html form.
I m using XAMPP1.7.0(installer)...My scripts for the same are:-

>> test.html
<html>
<body><form action="process.php" method="post">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form></body>
</html>

>> process.php

<html>
<body>Welcome <?php echo $_POST["name"]; ?>.<br />
You are <?php echo $_POST["age"]; ?> years old.</body>
</html>


The errors that i m getting is.....
when i click the submit button,it showing
File download..Do you want to open or save this file
Name:process.php
type:unknown file type
etc.

Please help me to find the solution?

Regards,
swes


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: PHP HANDLING FORMS
PostPosted: Thu Feb 12, 2009 6:18 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
It's because the server doesn't know what to do with .PHP files. Consult your server manual on how to make .PHP associated with PHP.

/Bylla

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: PHP HANDLING FORMS
PostPosted: Fri Feb 13, 2009 6:19 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Thu Feb 12, 2009 6:52 am
Posts: 4
Points: 0
Hi,

I m not able to INVOKE the process.php from test.html form.
I m using XAMPP1.7.0(installer)...My scripts for the same are:-

>> test.html
<html>
<body><form action="process.php" method="post">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form></body>
</html>

>> process.php

<html>
<body>Welcome <?php echo $_POST["name"]; ?>.<br />
You are <?php echo $_POST["age"]; ?> years old.</body>
</html>


The errors that i m getting is.....
when i click the submit button,it showing
File download..Do you want to open or save this file
Name:process.php
type:unknown file type
etc.

But if i change the test.html to test.php then its executes correctly.
Please help me to find the solution?

Regards,
shil


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: PHP HANDLING FORMS
PostPosted: Fri Feb 13, 2009 5:19 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
I think you have the solution there: change .html to .php.

/Bylla

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: PHP HANDLING FORMS
PostPosted: Sat Feb 14, 2009 7:59 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Thu Feb 12, 2009 6:52 am
Posts: 4
Points: 0
Hi,
But I want to invoke my php script from html,
according to the scripts i have mentioned.
Not only that i m not able to execute the following scripts too:-
test2.html...
Code:
<html>
<head>
<title>
</title>
</head>
<body>
<a href="test3.php"> Click</a>
</body>
</html>


test3.php....

Code:
<?php
echo "welcome, swes";
?>


I m getting the same error...

Is there any confuguration settings needed to be changed?
Is there any problem with the apache server?
Is there any problem with the settings of httpd.conf?

plz do guide me...

regards,
swes


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]