Jump to content

Archived

This topic is now archived and is closed to further replies.

zooner

Help with matching image to churchsigngenerator code

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
[!--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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
almost works!

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

Share this post


Link to post
Share on other sites
Sorry, I forgot to put the "<?php ?>" tags around the PHP code.. :-(

[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>
[/code]

Ken

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.