External PHP

He has: 1,380 posts

Joined: Feb 2002

Hey, i want to use that PHP script in my other thread inside a page, but i'm not sure how to execute it automatically, without it being a .php page. the reason is because i don't want my database names and passwords readily available to anyone who views the source. can i put it inside a element?
example:

<form method="post" path="/script.php">
</form>
'
will that work? again, i am unable to test PHP at this time due to host switching. thanks alot

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

You mean the hidden counter? Try using SSI.

He has: 1,380 posts

Joined: Feb 2002

i looked up SSI, so something such as:
<!--#exec cgi="/php/counter.php" -->' would work?

nike_guy_man's picture

They have: 840 posts

Joined: Sep 2000

If it's a .php your db name/pw won't be in the source... PHP is a server-side language, and if you put that in there, if it works, nothing will show, not in the source nor in the look of the site
Or have I read you wrong?
If you have this:

<?php
$password
= \"password\";
echo \"something\";
?>

the page will show
something
'
and the source will show
something
'
Right?

Laughing out loud

He has: 1,380 posts

Joined: Feb 2002

well i checked it out...i inserted the code into my page (.html)...saved, uploaded, viewed source...and it was there. i know i can use the .php extension for the page, but i can't do that due to the situation i am in.

anyways, as long as that SSI works, i'm fine

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.