Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transform: "@" in Hexadecimal

Status
Not open for further replies.

cabernet

Technical User
Feb 24, 2003
75
PK
Hello,
In my DB among others are two fields:
1) named "Mailto" var 10 default "mailto:"
2) named "Email" var 50 default NULL

my PHP script display the output in making page up, down , next etc...

the email output is scripted as follow:
<td width=&quot;33%&quot; align=&quot;left&quot; valign=&quot;top&quot;><a href=&quot;<?=$data[&quot;mailto&quot;]?><?=$data[&quot;email&quot;]?>&quot;    <font color=&quot;#990000&quot; size=&quot;2&quot;>E-Mail</font></a></td></tr>

My question is: I cannot figure how to write a code addition
that will tansform existing &quot;@&quot; part of stored data in its hexadecimal value?

thank you

regards
 
Do a simple swap with the character @ and the code for it, which is 40 in decimal, 28 in hex.
 
Hello Danielhozac,

here is what I have done after learning from your link

<td width=&quot;33%&quot; align=&quot;left&quot; valign=&quot;top&quot;><a href=&quot;<?=$data[&quot;mailto&quot;]?><?=$data[&quot;email', htmlentities(urlencode($userinput)), '&quot;&quot;]?>&quot;    <font color=&quot;#990000&quot; size=&quot;2&quot;>E-Mail</font></a></td></tr>

to check on error I have temp added a .htaccess
it seems to work and no errors are reported
thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top