Page 1 of 1

PHP code isn't visible

Posted: Wed Mar 19, 2008 9:14 am
by pankajhb
Hi,

On my PHP site, I have created a code that picks data from dbase and shows it in a drop down table. The problem I am facing now is that the code is not visible to me. It is working fine as any new entry into the table is reflected back in the drop down menu. However, when I look at the page, it doesn't show code. In place, it shows me the option values only. Please suggest what could be the possible reason for the same.


Thanks,
Pankaj

Re: PHP code isn't visible

Posted: Wed Mar 19, 2008 10:12 am
by John Cartwright
Not exactly sure what your question is?

Can you post some code?

Re: PHP code isn't visible

Posted: Wed Mar 19, 2008 10:34 am
by pankajhb
The problem is I cann't really see the php code that retrieves value from dbase and puts it in the drop down menu. Instead, code has been replaced with the values from dbase.. Hope its a bit clear.

Thanks,
Pankaj

Re: PHP code isn't visible

Posted: Wed Mar 19, 2008 2:11 pm
by impulse()
If you're expecting to see PHP code in the HTML source then think again.

Can you not just view the .PHP file on the web server?

Re: PHP code isn't visible

Posted: Sun Mar 30, 2008 6:54 pm
by AMCH
You can't see the php code, it has already been executed on the server and the output shows on your screen.

For instance:

Code: Select all

$a_variable = "hello";
echo "<b>$a_variable</b>"
When this code is executed you will see "hello" written on your screen, when you view the source code of the page in the browser you will see "<b>hello</b>".

Hope this helps

Kind Regards
AMCH