Jump to content


Photo

Help with matching image to churchsigngenerator code


  • Please log in to reply
7 replies to this topic

#1 zooner

zooner
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 June 2006 - 07:06 AM

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.com

any help would be appricated and a donation will be made to phpfreaks in your name.

Thanks for any help!

tom

#2 glenelkins

glenelkins
  • Members
  • PipPipPip
  • Advanced Member
  • 760 posts
  • LocationBridlington - East Riding of Yorkshire - United Kingdom

Posted 10 June 2006 - 07:48 AM

here is an example of a simple way to do this:

USER ENTRY FORM - for text (index.php)
<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>

This is just a quick example of how this could work
http://thewebsolutionprovider.com - A Solution For Everything Web!

#3 zooner

zooner
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 June 2006 - 08:07 AM

[!--quoteo(post=382167:date=Jun 10 2006, 03:48 AM:name=glenelkins)--][div class=\'quotetop\']QUOTE(glenelkins @ Jun 10 2006, 03:48 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
here is an example of a simple way to do this:

USER ENTRY FORM - for text (index.php)
<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>

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!

<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>

I'm missing two things. How to activate the text into the image.

#4 zooner

zooner
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 11 June 2006 - 09:32 AM

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.

#5 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 11 June 2006 - 05:07 PM

You're almost there with this:
<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>
You have too many "<div>" tags. Try:
<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>

Ken

#6 zooner

zooner
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 11 June 2006 - 07:59 PM

almost works!

[a href=\"http://brian.mol8.com/index.php\" target=\"_blank\"]http://brian.mol8.com/index.php[/a]

#7 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 12 June 2006 - 01:32 AM

Sorry, I forgot to put the "<?php ?>" tags around the PHP code.. :-(

<html>
<head>
<title></title>
<body>
<img src="brian.jpg">
<?php
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>

Ken

#8 zooner

zooner
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 12 June 2006 - 08:25 AM

Ken, you are amazing!!

www.briantalks.com

my friends and family will share many laughs over this.

As promised, I have donated $20 in your name.

thanks again!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users