polaric Posted May 31, 2011 Share Posted May 31, 2011 Hi, i'm new in php. I'm building a website for my project. My prof wants us to combine php and html. .i've created the web page and it's working fine. .but when i'm about to make a link from my html page to my php page something went wrong. .although it's jumping to the php page,but this was what happened: Thanks for registering! "; } //The web form for input ability else { echo " \n"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "" ; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo " \n"; } // EOF ?> Username: \n Password: \n First Name: \n Middle Name: \n Last Name: \n Nick Name: \n Gender: all my php codings showed up on the page. the page should be neat. my php file is located on my c drive on wamp folder. then my html file are located on the d: drive. . another help, if my php file is not in my wamp folder, let say its on another folder, how can i access it?. . please help me, and be patient on this one . .thanks so much Link to comment https://forums.phpfreaks.com/topic/237970-jumping-from-an-html-web-page-to-a-php-page/ Share on other sites More sharing options...
Kieran Menor Posted May 31, 2011 Share Posted May 31, 2011 You cannot open a PHP script directly in a web browser. It has to pass through a web server. The reason is that PHP is a server-side scripting language, meaning it is parsed by the server before the result is sent to the browser. As such, you will not be able to view a PHP script located anywhere on your hard disk correctly. If you are linking from a HTML file on your hard disk to a PHP script on a local web server, make sure that the link points to http://localhost/myscript.php and not C:\whatever\myscript.php. Link to comment https://forums.phpfreaks.com/topic/237970-jumping-from-an-html-web-page-to-a-php-page/#findComment-1222761 Share on other sites More sharing options...
polaric Posted May 31, 2011 Author Share Posted May 31, 2011 wow works great. .i've got it. .thanks so much. .i owe u one. thank you,thank you!. . Link to comment https://forums.phpfreaks.com/topic/237970-jumping-from-an-html-web-page-to-a-php-page/#findComment-1222766 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.