linking php

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
alenxVR6
-


Joined: 04 Dec 2003
Posts: 51
Location: Revere, Boston MA

PostPosted: Mon Jun 07, 2004 2:01 pm    Post subject: linking php Reply with quote

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 View user's profile Send private message Visit poster's website AIM Address
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Jun 07, 2004 8:31 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Tue Jun 08, 2004 12:31 am    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
alenxVR6
-


Joined: 04 Dec 2003
Posts: 51
Location: Revere, Boston MA

PostPosted: Tue Jun 08, 2004 1:16 am    Post subject: Reply with quote

i'm using dreamwaver to generate the code but i figured it out. thank you

Back to top View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group