Jump to content

Help with matching image to churchsigngenerator code


zooner

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
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
[!--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.
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
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

Archived

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

×
×
  • Create New...

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.