Check if a user entered an email address that has a domain similar to the domain name they enter above
<p>In my signup form, I ask users to enter an email with the same domain name as they enter in the url field above.</p>

<p>Right now, I collect data this way:</p>

<p>URL : <code>http://www.</code><strong>domain.com</strong> The domain.com part is what the user enters. The <code>http://www</code> is hard coded.</p>

<p>Email : <strong>info</strong>@ <strong>domain.com</strong> The bold part is entered by the user. The <strong>@</strong> is hard coded.</p>

<p>The domain.com part in the url and domain.com part in the email should match. Right now, I can match the two fields since they are separate.</p>

<p>But I want to give up the above approach and make the user enter the entire domain name and email. When that's the case, what would be a good way to check if a user entered an email with the same domain he entered in the url field above.</p>

<p>I'm doing all this using php.</p>
