coldfiretech Posted August 26, 2008 Share Posted August 26, 2008 Okay so i have a basic community site. I am setting up the modify profile page right now... On my page i have a bunch of text boxes and what not for them to insert their data into.. What i am trying to do is when there is already data in the database it will print the data from the field in the database into the text box. Its an html page with php inside of it.. Tried this in html but it just prints the value in the box <input type="text" name="name" value="'.$row['pi_first_name'].'" /> Any suggestions? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted August 26, 2008 Share Posted August 26, 2008 Does the file have a php or html extension? If it's HTML, then it's not going to work unless you set it up to. If it's a PHP file, you need to open the php tags, like this: <input type="text" name="name" value="<?php echo $row['pi_first_name']; ?>" /> Quote Link to comment Share on other sites More sharing options...
coldfiretech Posted August 26, 2008 Author Share Posted August 26, 2008 how would i go about getting it setup to work on an html page? I already have this.. I just wrote this 5 mins ago and it works in php.. Can u show me how to do this in html with all of my textboxes that are already there??? I dont want to change anything asthetically.. Pretty new to web dev.. Im a vb dev jumping in to fill a position Quote Link to comment Share on other sites More sharing options...
marcus Posted August 26, 2008 Share Posted August 26, 2008 .htaccess AddType application/x-httpd-php .php .htm .html AddHandler x-httpd-php .php .htm .html Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted August 26, 2008 Share Posted August 26, 2008 You have to configure your .htaccess file. You need to add this line to it: AddType application/x-httpd-php .php .html Beat to it. Quote Link to comment 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.