raymond_feliciano Posted February 13, 2012 Share Posted February 13, 2012 Not sure if this is the correct place to ask this question but here we go. I just wanted to know if I could insert into a MySQL database table a PHP conditional statement. I mean I am able to add this data to the table but when I grab that info from the table and echo it out to the browser it does not get displayed correctly. What I am trying to do is add a small login form into the table and render it out but I see the acutal code instead of the form. If I removed all PHP code the form will render correctly. So I was thinking either I cant add PHP or I am doing it wrong. Quote Link to comment https://forums.phpfreaks.com/topic/257073-php-mysql/ Share on other sites More sharing options...
jcbones Posted February 14, 2012 Share Posted February 14, 2012 That is not a real good idea, and I am not sure why you cannot hard code a login form. To answer you question though, you can use eval. Quote Link to comment https://forums.phpfreaks.com/topic/257073-php-mysql/#findComment-1317959 Share on other sites More sharing options...
KevinM1 Posted February 14, 2012 Share Posted February 14, 2012 That has 'bad idea' written all over it. Why do you feel it's necessary to store code to be executed in the db? Quote Link to comment https://forums.phpfreaks.com/topic/257073-php-mysql/#findComment-1317968 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.