Forums

Check Domain Form

manfredk 20 Apr, 2008
Hi
I have a simple Check Domain Form which directs to another Site to check availability. Form works but I would like to receive Email when Form is used.

I have 2 Scenarios which do or do not work:

Form Submits but Domain Name ALWAYS SHOWS NOT AVAILABLE on remote Site if I enter FORM ACTION: into TAB 'FORM URL'S' 'Submit URL: the form "action" URL' where it says though - don't put anything here unless you know what you are doing Email of the Form comes to me.

IF I enter the Form Action into the Box above that called 'Redirect URL' the form submits as well and Domain names show as available (if they are) but mail does not come to me
Any Ideas how to do this?

Here is the original Form Code:
<FORM ACTION="http://www.checkdomain.co.za/whois.asp" METHOD="post">
    <CENTER>
        Check this domain:
        <INPUT TYPE="TEXT" NAME="Domain" SIZE="15">
		<SELECT NAME="Suffix">
			<option value=".co.za" SELECTED>.co.za</option>
			<option value=".com">.com</option>
			<option value=".info">.info</option>
			<option value=".net">.net</option>
			<option value=".org">.org</option>
		</SELECT>
        <INPUT TYPE="SUBMIT" VALUE="Search">
        <INPUT TYPE="HIDDEN" NAME="RefererName" VALUE="Your Name">
        <INPUT TYPE="HIDDEN" NAME="RegisterURL" VALUE="http://www.YourURL.co.za/">
    </CENTER>
</FORM>
I have taken the Line FORM Action OUT there and added that to the Tab as explained above.

Edited for clarity<br><br>Post edited by: GreyHead, at: 2008/04/21 01:04
GreyHead 21 Apr, 2008
Hi madfredk,

I think I understand.

If you use the Submit URL then the form is submitted to the whois site and ChronoForms never sees it.

If you use the Redirect URL then you get your email but the $_POST data is lost.

Will the whois domain accept GET variables? If you enter
http://www.checkdomain.co.za/whois.asp?Domain=example&Suffix=.org&RefererName=MyName&RegisterURL=http://www.YourURL.co.za/
will that work? If so then you can rebuild a Redirect URL in one of the OnSubmit code boxes and it will be sent OK. (I think you'l find an example here of doing that with PayPal.)

If not you can send a POST array but I don't remember the code without searching it out.

Bob

PS I see you'd need to encode the URL but that's easy.<br><br>Post edited by: GreyHead, at: 2008/04/21 01:12
manfredk 26 Apr, 2008
Hi Bob
Sorry for late reply (I am in South Africa and we get CAPPED)
I entered the URL as suggested into a new Browser Window and it seems to work (Results come back from the WHOIS Site) I am not sure about the Rest though
I looked for the PAYPAL Sample and found this one
<?php
$paypal_url = http://www.checkdomain.co.za/whois.asp
$rows[0]->redirecturl = $paypal_url;
?>


which I put into the ON SUBMIT BEFORE Box.
Then I emptied out the REDIRECT and SUBMIT URL on the FORM URL TAB leaving them both empty.
On testing the Form I get the"COULD NOT INITIATE MAIL" Error and this Error Message:
Parse error: syntax error, unexpected ':' in /home/manfredk/public_html/components/com_chronocontact/chronocontact.php(390) : eval()'d code on line 2

Thank you for submitting our form.

I do however receive the Submit Content via email to me i.e. I am now able to see which Domain Name the Inquirer is asking for-which is what I wanted.
Any Idea on the Error message though? Something to do with you mentioning something about encoding?
Regards
Manfred
GreyHead 26 Apr, 2008
Hi Manfred,

The error message is because the PayPal sample isn't quite correct. Try:
 <?php
$paypal_url = "http://www.checkdomain.co.za/whois.asp";
$rows[0]->redirecturl = $paypal_url;
?>
Bob
manfredk 26 Apr, 2008
Hi Bob
Okay tried that. Thank you for that.
Form does get submitted to the WHOIS Site and I do get the Email with Form Content but Problem is ALL Domain Names show as not available (Tested with really funny ones like hfhjehrjehrje.co.za etc-which must be available) So it seems something is not passed to the Whois Site?
I have Form Action to Post (if I change to get I get redirected to my own 404 Page)
Also added (and un added) this to the FORM TAG Attachement (Not sure if that is what you meant by encoding previously)

encoding=UTF-8

but does not seem to make a difference.
Should both my FORM URL Boxes be empty?
Regards
Manfred
BTW my url is <!-- w --><a class="postlink" href="http://www.manfredk.com">www.manfredk.com</a><!-- w --> and the form is on the frontpage a bit down.
GreyHead 27 Apr, 2008
Hi Manfred,

If you look at the page source code you'll find this hidden field in your form
<input type="hidden" value="  
<script language='JavaScript' type='text/javascript'>  
<!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; 
var addy32195 = 'jbis' + '@'; addy32195 = addy32195 + 'manfredk' + '.' + 'com'; 
document.write( '<a ' + path + '\'' + prefix + ':' + addy32195 + '\'>' ); 
document.write( addy32195 ); document.write( '<\/a>' ); //-->\n </script>
<script language='JavaScript' type='text/javascript'>  
<!-- document.write( '<span style=\'display: none;\'>' ); //-->  
</script>This e-mail address is being protected from spambots, 
you need JavaScript enabled to view it <script language='JavaScript' 
type='text/javascript'>  <!-- document.write( '</' ); document.write( 'span>' ); //-->  
</script>" name="self"/>
This is your email address being cloaked by the email cloaking mambot.

Go to the mambot manager and turn off the Email Cloaker and check if your form then works! If it does then reverse the order of the ChronoForms mambot and the email cloaker and all should be well.

Bob
This topic is locked and no more replies can be posted.