elabuwa Posted September 22, 2009 Share Posted September 22, 2009 Hey guys, A noob needin your help. I searched the forum for similar threads but couldnt get any results. May be an incorrect use of keywords, if so please accept my apologies. And also please accept my apologies if i have posted in the wrong section. I have this html page designed with some text boxes etc. What I want it to do is when the page is loaded, the text boxes are supposed to be with some values. Best example is when you go to edit your profile in php freaks the email addy comes up automatically filled. Therefore, I have php runnin at two places in the page. At the top to get all the values from the database and to store them in php variables. And the second one below. <input type="text" name="acnum1" value="<?php echo $acnumber;?>" /> The problem is that the page loads with out any errors. But instead the text box having only the value of the $acnumber variable, the text box has the following text. "<?php echo $acnumber;?>" Can you guys please help me out. i think there is some syntax error or something like that but i googled and all the pages that show the example codes contain the same method. I tried runnin it on another comp that has php server runnin but gave me the same problem. THanks a million in advance. Quote Link to comment https://forums.phpfreaks.com/topic/175069-solved-fill-text-box-with-php-variable-value/ Share on other sites More sharing options...
smerny Posted September 22, 2009 Share Posted September 22, 2009 is the file a php file? (something.php) Quote Link to comment https://forums.phpfreaks.com/topic/175069-solved-fill-text-box-with-php-variable-value/#findComment-922680 Share on other sites More sharing options...
haku Posted September 22, 2009 Share Posted September 22, 2009 Can't tell you anything without seeing your code mate. You should always add the relevant code when asking questions. Quote Link to comment https://forums.phpfreaks.com/topic/175069-solved-fill-text-box-with-php-variable-value/#findComment-922690 Share on other sites More sharing options...
Zane Posted September 22, 2009 Share Posted September 22, 2009 1. Do you have this page saved with a .php extension or a .htm(l) extension 2. Are you SURE that php is installed? Quote Link to comment https://forums.phpfreaks.com/topic/175069-solved-fill-text-box-with-php-variable-value/#findComment-922731 Share on other sites More sharing options...
elabuwa Posted September 22, 2009 Author Share Posted September 22, 2009 hey uys, thank you for the quick replies. The file is saved as in html file. It has php codin in it startin with <?php and endin with ?> Php is workin fine as other pages with .php extension seems to do their magic and gimme the required result. I'll post the entire pages coding in a while. Thanks again. :D Quote Link to comment https://forums.phpfreaks.com/topic/175069-solved-fill-text-box-with-php-variable-value/#findComment-922866 Share on other sites More sharing options...
trq Posted September 22, 2009 Share Posted September 22, 2009 By default php needs to be served within files ending with the .php extension. html files do not (by default) get parsed by the php parser. Quote Link to comment https://forums.phpfreaks.com/topic/175069-solved-fill-text-box-with-php-variable-value/#findComment-922870 Share on other sites More sharing options...
elabuwa Posted September 23, 2009 Author Share Posted September 23, 2009 ohh crapola!! how can i miss that. it worked changed it to php and did echoin for the html parts. thank you thank you guys. Im just lovin it here in Phpfreaks Quote Link to comment https://forums.phpfreaks.com/topic/175069-solved-fill-text-box-with-php-variable-value/#findComment-923232 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.