Jump to content

Need PHP Help extract mail from a link


butchhh

Recommended Posts

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.com/6969&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
Link to comment
Share on other sites

$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.

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


regards
Liam
Link to comment
Share on other sites

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.com/userid=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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.