Jump to content

Search the Community

Showing results for tags 'escape @'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 1 result

  1. I have a form that reads in an email address. I get things like name@yaoo.com. I would like to catch these common mistakes and correct them. However, sometimes the thing I'm looking at is correctly typed on the left side of the @. So if someone has a valid yaoo@yahoo.com I don't want to make this replacement. So, I only want to look at what is on the right side of the @. I have tried including the @ in my compare/replace but that doesn't seem to work at all. Any ideas how I might do this? $action = "first"; if (isset ($_POST['action'])) $action = $_POST['action']; if ($action == 'first') { print "<form method='post' action='fixResource.php'>"; print "<input type='text' name='emailIn' value='$emailIn'>\n"; print "<input type='hidden' name='action' value='second'>\n"; print "<input TYPE='SUBMIT' NAME='Agree' VALUE='Give this a try'>\n"; } if ($action == 'second') { $email = $_POST['emailIn']; $email = str_ireplace('@yaoo','@yahoo',$email,$change); if ($change > 0) print "Warning - email address has been changed.<br><br>"; }
  • 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.