zooner Posted June 10, 2006 Share Posted June 10, 2006 While I do have some experience playing with html, forum building and other code exercises, I know nothing about php.I'd like to create a webpage with an image that allows the user to insert their own custom text into the quotation bubble.I'm trying to take the following image:[img src=\"http://www.mol8.com/brian.jpg\" border=\"0\" alt=\"IPB Image\" /]I want to adapt the following code:[a href=\"http://www.churchsigngenerator.com/source.phps\" target=\"_blank\"]Link for churchsigngenerator code[/a]It will be hosted at briantalks.comany help would be appricated and a donation will be made to phpfreaks in your name.Thanks for any help!tom Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/ Share on other sites More sharing options...
glenelkins Posted June 10, 2006 Share Posted June 10, 2006 here is an example of a simple way to do this:[b]USER ENTRY FORM - for text (index.php)[/b][code]<img src="yourimage.jpg"><div positions><? echo $_POST['inputtext']; ?></div> <!-- USE A DIV TO POSITION THE TEXT OVER IMAGE --><form name="usertext" method="POST" action="<? echo $_SERVER[PHP_SELF]; ?>"> <input type="text" name="inputtext" size="30" maxlength="100"> <br> <input type="submit" name="submit" value="Submit"></form>[/code]This is just a quick example of how this could work Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/#findComment-43947 Share on other sites More sharing options...
zooner Posted June 10, 2006 Author Share Posted June 10, 2006 [!--quoteo(post=382167:date=Jun 10 2006, 03:48 AM:name=glenelkins)--][div class=\'quotetop\']QUOTE(glenelkins @ Jun 10 2006, 03:48 AM) [snapback]382167[/snapback][/div][div class=\'quotemain\'][!--quotec--]here is an example of a simple way to do this:[b]USER ENTRY FORM - for text (index.php)[/b][code]<img src="yourimage.jpg"><div positions><? echo $_POST['inputtext']; ?></div> <!-- USE A DIV TO POSITION THE TEXT OVER IMAGE --><form name="usertext" method="POST" action="<? echo $_SERVER[PHP_SELF]; ?>"> <input type="text" name="inputtext" size="30" maxlength="100"> <br> <input type="submit" name="submit" value="Submit"></form>[/code]This is just a quick example of how this could work[/quote]I feel as if I'm SO close to getting this to work now![code]<html><img src="brian.jpg"><div positions><? echo $_POST['inputtext']; ?></div><DIV STYLE="position:absolute; top:60px; left:370px; width:200px; height:25px"></DIV><form name="usertext" method="POST" action="<? echo $_SERVER[PHP_SELF]; ?>"> <input type="text" name="inputtext" size="30" maxlength="100"> <br> <input type="submit" name="submit" value="Submit"></form></html>[/code]I'm missing two things. How to activate the text into the image. Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/#findComment-43953 Share on other sites More sharing options...
zooner Posted June 11, 2006 Author Share Posted June 11, 2006 I keep pouring over the code, trying to understand the next step in getting this to work.I know it's easy, but it's simply outside my realm of understanding.any help would be appriciated. Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/#findComment-44218 Share on other sites More sharing options...
kenrbnsn Posted June 11, 2006 Share Posted June 11, 2006 You're almost there with this:[code]<html><img src="brian.jpg"><div positions><? echo $_POST['inputtext']; ?></div><DIV STYLE="position:absolute; top:60px; left:370px; width:200px; height:25px"></DIV><form name="usertext" method="POST" action="<? echo $_SERVER[PHP_SELF]; ?>"> <input type="text" name="inputtext" size="30" maxlength="100"> <br> <input type="submit" name="submit" value="Submit"></form></html>[/code]You have too many "<div>" tags. Try:[code]<html><head><title></title><body><img src="brian.jpg">if (isset($_POST['inputtext'])) { echo '<DIV STYLE="position:absolute; top:60px; left:370px; width:200px; height:25px">'; echo $_POST['inputtext']; echo '</DIV>'; }<form name="usertext" method="POST" action="<? echo $_SERVER[PHP_SELF]; ?>"> <input type="text" name="inputtext" size="30" maxlength="100"> <br> <input type="submit" name="submit" value="Submit"></form></body></html>[/code]Ken Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/#findComment-44321 Share on other sites More sharing options...
zooner Posted June 11, 2006 Author Share Posted June 11, 2006 almost works![a href=\"http://brian.mol8.com/index.php\" target=\"_blank\"]http://brian.mol8.com/index.php[/a] Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/#findComment-44387 Share on other sites More sharing options...
kenrbnsn Posted June 12, 2006 Share Posted June 12, 2006 Sorry, I forgot to put the "<?php ?>" tags around the PHP code.. :-([code]<html><head><title></title><body><img src="brian.jpg"><?phpif (isset($_POST['inputtext'])) { echo '<DIV STYLE="position:absolute; top:60px; left:370px; width:200px; height:25px">'; echo $_POST['inputtext']; echo '</DIV>'; }?><form name="usertext" method="POST" action="<? echo $_SERVER[PHP_SELF]; ?>"> <input type="text" name="inputtext" size="30" maxlength="100"> <br> <input type="submit" name="submit" value="Submit"></form></body></html>[/code]Ken Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/#findComment-44472 Share on other sites More sharing options...
zooner Posted June 12, 2006 Author Share Posted June 12, 2006 Ken, you are amazing!!www.briantalks.commy friends and family will share many laughs over this.As promised, I have donated $20 in your name.thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/11639-help-with-matching-image-to-churchsigngenerator-code/#findComment-44544 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.