Jump to content


Photo

Need PHP Help extract mail from a link


  • Please log in to reply
2 replies to this topic

#1 butchhh

butchhh
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 03 September 2006 - 02:55 PM

I need some help with PHP on my website. I have a website and i need to make a box when someone place a username in a box will get the e-mail of that user from a link, the user entered in the box will be added at the end of a link ex: http://www.mywebsite...userid=USERHERE this will load a page with some infos, and i dont know how to make to extract just the email address without seeing other infos or that webpage.

Ill really apreciate this thank you

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 03 September 2006 - 03:21 PM

$id=mysql_real_escape_string($_GET['userid']);

that will set the variable $id to USERHERE in the url and also strip the url of some potentially dangerous exploits

e.g.

$id=mysql_real_escape_string($_GET['userid']);
$query=mysql_query("SELECT * FROM table_name WHERE id = '$id'") or die (mysql_error());
$row=mysql_fetch_array($query);

echo $row['email'];


regards
Liam
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 butchhh

butchhh
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 04 September 2006 - 04:25 PM

i dont have a database but now i dont need 2 extract the email anymore i'm using the iframe in php like <iframe src="http://www.mysite.co...serid=USERHERE" width="100%" height="100%"> now all i need is a box where u enter the user and will place it at the end of the link USERHERE and load with the page in the iframe with php so the users cant see the link...

regards





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users