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
PHP code isn't visible
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: PHP code isn't visible
Not exactly sure what your question is?
Can you post some code?
Can you post some code?
Re: PHP code isn't visible
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
Thanks,
Pankaj
-
impulse()
- Forum Regular
- Posts: 748
- Joined: Wed Aug 09, 2006 8:36 am
- Location: Staffordshire, UK
- Contact:
Re: PHP code isn't visible
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?
Can you not just view the .PHP file on the web server?
Re: PHP code isn't visible
You can't see the php code, it has already been executed on the server and the output shows on your screen.
For instance:
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
For instance:
Code: Select all
$a_variable = "hello";
echo "<b>$a_variable</b>"Hope this helps
Kind Regards
AMCH