View previous topic :: View next topic |
Author |
Message |
alenxVR6 -
Joined: 04 Dec 2003 Posts: 51 Location: Revere, Boston MA
|
Posted: Mon Jun 07, 2004 2:01 pm Post subject: linking php |
|
|
I’m currently building a guestbook, and I have everything under control but I just wanted to know how could I link the data that is submitted...
Lets say I have name, email, URL and message fields
If a user types his/her name, email, URL, and message how would i link the email or URL, so if they entered user@isp.com (clicking on that would open my default email program) and www.isp.com (clicking on that would open a browser and go to that URL)
http://www.alenx.net/alenxdesign/guestbook_view.php |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Jun 07, 2004 8:31 pm Post subject: |
|
|
Im understanding that you want links on your
GuestBook that link to certain things , one will
launch your e-mail program and the other may
launch a website , do this !
E-mail Address
Code: |
<a href='mailto:$email'>$email</a>
|
Website Address
Code: |
<a href='$url' target='_blank'>$url</a>
|
Note: Make sure those exact variables are taken
in the PHP code and that they match the form. |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Tue Jun 08, 2004 12:31 am Post subject: |
|
|
Like this:
Form Page:
Code: | <html>
<form name="form1" action="action.php">
Name: <input name="name">
Email: <input name="email">
<input type="submit"> |
Action Page: Code: | <?php
echo('Thank you $_POST['name'] at <a href=\"mailto:$_POST['email']\">$_POST['email']</a>.')
?>
| And no globals or extraneous variables. _________________ Bienvenidos! |
|
Back to top |
 |
 |
alenxVR6 -
Joined: 04 Dec 2003 Posts: 51 Location: Revere, Boston MA
|
Posted: Tue Jun 08, 2004 1:16 am Post subject: |
|
|
i'm using dreamwaver to generate the code but i figured it out. thank you
 |
|
Back to top |
|
 |
|