Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 105,772 PHP Programmers for FREE! Ask your question and get quick answers from experts. There are 1,435 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Dynamic HTML with PHP

 
Reply to this topicStart new topic

Dynamic HTML with PHP

skirkpatrick
post 18 Jul, 2008 - 02:02 PM
Post #1


New D.I.C Head

*
Joined: 18 Feb, 2008
Posts: 11

I am being brain dead:

I am trying to create a dynamic form that will look to the mysql database to see whether the statement brings any results - if the answer is yes to create a text box and then fill the text box with the resulting results. Otherwise disreguard and move onto the next statement.

CODE

<?php
if ($totalRows_Recordset1 == 1)
echo ("Yes this works!");  
else
;
?>
<input name="Testing" type="text" id="Testing" value="<?php echo $row_Recordset1['Name']; ?>" />


What I would like to do is to insert the html statement inplace of the echo command. I just cannot get the syntax correct.

Any help is greatly appreciated.

Steve
User is offlineProfile CardPM

Go to the top of the page


MitkOK
post 18 Jul, 2008 - 02:27 PM
Post #2


D.I.C Regular

Group Icon
Joined: 9 Aug, 2007
Posts: 267



Thanked 9 times

Dream Kudos: 225
My Contributions


Do you get any error or ? Do you have connection to DB, result from query ...
User is online!Profile CardPM

Go to the top of the page

skirkpatrick
post 18 Jul, 2008 - 04:31 PM
Post #3


New D.I.C Head

*
Joined: 18 Feb, 2008
Posts: 11

Yes I have a connection to the database and if I insert the html I get a blank screen so I am getting some type error but I don't know what it is. Seems that it just will not get through the syntax.

Steve
User is offlineProfile CardPM

Go to the top of the page

skirkpatrick
post 18 Jul, 2008 - 06:22 PM
Post #4


New D.I.C Head

*
Joined: 18 Feb, 2008
Posts: 11

QUOTE(skirkpatrick @ 18 Jul, 2008 - 04:31 PM) *

Yes I have a connection to the database and if I insert the html I get a blank screen so I am getting some type error but I don't know what it is. Seems that it just will not get through the syntax.

Steve

I found the solution ' ' around the input type
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 03:51PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month