Question:
How do I call a php script in my HTML page?
2011-07-30 07:15:52 UTC
I've designed a html webpage in dreamweaver. And I've also done the php coding in a separate .php file. In my html page, I used
so, why doesn't the php work? Is there any way where I can retrieve values from textbox without using get or post or session? How can I do that?

Note: My wamp is fully working. All other separate php scripts are working fine.
Six answers:
2011-07-30 07:50:22 UTC
If you did not set a submit tag in your html form set one.

Silent
2011-07-30 07:25:33 UTC
Without being able to see your code, it's very difficult to know exactly what the problem is. Just saying it "doesn't work" provides no useful information. Please be more specific about the problem you're having in the PHP script, and post both the PHP and HTML documents to http://www.pastebin.com and include the link here.



You ask if there's a way you can "retrieve values from textbox without using get or post or session". Think about this for a second. It's like asking "Is there any way I can drive to the movies without driving or going to the movies?"



In both cases the answer is "No, and the fact that you're even asking the question implies that you have a fundamental misunderstanding of the situation".
ferer
2016-10-16 10:45:09 UTC
dynamic recommendations superhighway pages do now no longer artwork this variety in case you do now no longer wanna contain a db and save your information in why do now no longer you write your purchasers comments suitable right into a report separated with the help of utilising empty strains then as quickly as you show your web page study the report and append all comments on your HTML reaction good achievement
.
2011-07-30 08:22:48 UTC
Your php script is not working because it's on an html page. Change your extension on the html page and see if it works. It should.



If you want php to work on a page with an html extension, you have to tell apache to parse the html page as php. You do this in apache itself, or use htaccess to do so on separate sites.



Google apache handlers for your situation.



http://support.hostgator.com/articles/cpanel/apache-handlers-running-html-as-php

http://www.truecastdesign.com/articles/article002.html
?
2011-07-30 08:08:51 UTC
To get php to work you must run apache, Which you can get by download xampp, Then to view your php coding you do this,



http://localhost/NAME.php
Richard I
2011-08-01 02:53:44 UTC
In php.ini register_global=on for work your script...


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...