SirChick Posted July 27, 2007 Share Posted July 27, 2007 How do you create a line in html to call a php file instead of having the php typed out fully withing the html ? But i'd need to know two things, firstly im going to need to run php at different methods, these would be either the second the page loads the php would run or upon an action the code will run. So basically i would have a html file + the php file seperate and then the html file calls up the php file. I currently have the html and php all in one note pad and it displays all my code in the page source :S Quote Link to comment Share on other sites More sharing options...
sKunKbad Posted July 27, 2007 Share Posted July 27, 2007 an html file can't call a php file unless its a iframe, and that would be the really bad way to do it. You really need learn how to move between php and html inside the same page. For instance: <p>this is html</p> <?php echo "this is php"; ?> Quote Link to comment Share on other sites More sharing options...
SirChick Posted July 27, 2007 Author Share Posted July 27, 2007 an html file can't call a php file unless its a iframe, and that would be the really bad way to do it. You really need learn how to move between php and html inside the same page. For instance: <p>this is html</p> <?php echo "this is php"; ?> I know that..... :S that wasn't what i was on about....... Let me explain. My registration code has the php right at the start of the page but only runs upon the register button being pressed, ive tested it and it all works dandy. Underneath that is the html that displays the page and form etc. But on page source on a browser it displays the php aswell as the html. But i only want it to show the html and not the php.....otherwise they can see the connect to the database plus login n password that im using... which is not good obviously. Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 27, 2007 Share Posted July 27, 2007 save file as .php ok not .html Quote Link to comment Share on other sites More sharing options...
SirChick Posted July 27, 2007 Author Share Posted July 27, 2007 done that also... Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 27, 2007 Share Posted July 27, 2007 post the code then Quote Link to comment Share on other sites More sharing options...
sKunKbad Posted July 27, 2007 Share Posted July 27, 2007 put expose_php = off in your php.ini file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.