Jump to content

reflex84

Members
  • Content Count

    98
  • Joined

  • Last visited

Community Reputation

2 Neutral

About reflex84

  • Rank
    Newbie
  1. Should anything be done to the a href of the link that opens the lightbox? <a id="various1" href="#res">Enquire Now</a> The href above is #res which opens a hidden div (which is the form): <div style="display: none;"> <div id="res"><div id="contact"> <div id="message"></div> <form method="post" action="ajax-contact-form-extended/ajax-contact-extend/contact.php" name="contactform" id="contactform"> <fieldset> <legend>Please fill in the following form to contact us</legend> <label for="name" accesskey="U"><span class="required">*</span> Your Name</label> <input name="name" type="text" id="name" size="30" value="" /> <br /> <label for="email" accesskey="E"><span class="required">*</span> Email</label> <input name="email" type="text" id="email" size="30" value="" /> <br /> <label for="phone" accesskey="P"><span class="required">*</span> Phone</label> <input name="phone" type="text" id="phone" size="30" value="" /> <br /> <label for="subject" accesskey="S">Subject</label> <select name="subject" id="subject"> <option value="Support">Support</option> <option value="a Sale">Sales</option> <option value="a Bug fix">Report a bug</option> </select> <br /> <label for="comments" accesskey="C"><span class="required">*</span> Your comments</label> <textarea name="comments" cols="40" rows="3" id="comments" style="width: 350px;"></textarea> <p><span class="required">*</span> Are you human?</p> <label for="verify" accesskey="V"> <img src="ajax-contact-form-extended/ajax-contact-extend/image.php" alt="Image verification" border="0"/></label> <input name="verify" type="text" id="verify" size="6" value="" style="width: 50px;" /><br /><br /> <input type="submit" class="submit" id="submit" value="Submit" /> </fieldset> </form></div> </div></div> I tried saving the form in a text document and using ajax to open the lightbox and form - is this better: <a id="various22" href="form.txt">Enquire Now</a> I'm lost - I doubt I'll get this right, which I've been trying for weeks now!
  2. Hi, I am having issues with a form that I have got which pops up in a lightbox frame (fancybox).I've got a text link, that when it is clicked, a form pops up in lightbox frame ... I fill the form in, click submit and the "success" message appears as normal. I close the lightbox, but when I click on the text link to open the form again, I get the "success" message from the previous submission and not the form! I need it to upload the form... I've been struggling for hours trying to work this out but not getting anywhere! Click this link to see the form and to try it out yourself if you'd like.http://www.testing123.co.za/index.htm How do I sought this problem out? If you need any information, like javascript, let me know ... Appreciate your help! D.
  3. Hi, I have questions with regards to dedicated servers and the package we currently have with Godaddy. Our dedicater server specs are as follows: OS: Microsoft Windows server 2003, Web edition, service pack 2Intel Pentium 4 CPU 3.00GHz1GB Ram150GB Hard driveI'm not sure what our bandwidth is, but I think its 500GB per month20GB FTP BackupMySQLHmailserverPHP 5 We are paying $115 /m for this dedicated server!Am I getting ripped off? I hear that Godaddy is only good for buying domain names and thats it!This dedicated server is like the computer people bought back in the late 90's!! I am really considering "upgrading" my dedicated server and what we don't like about the Godaddys dedicated server, is the fact that we DO NOT have tech support!!We do need tech support. Further questions:1) Is it necessary to have a faster computer and operating system?2) Who can offer me a dedicated server with full support (so if we have problems with the hmailserver or MySQL, we can contact the company to resolve the issue(s)?3) If I decide to go with a new dedicated server, can we simply transfer all the data from our current server to the new server? I would appreciate your responce / advice and suggestions, thanks!
  4. Hi, I really need to add a captcha to this PHP process form?How do I go about doing this? <?php // Define some constantsdefine( "RECIPIENT_NAME", "John Smith" );define( "RECIPIENT_EMAIL", "john@example.com" );define( "EMAIL_SUBJECT", "Visitor Message" ); // Read the form values$success = false;$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : "";$senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : "";$message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : ""; // If all values exist, send the emailif ( $senderName && $senderEmail && $message ) { $recipient = RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">"; $headers = "From: " . $senderName . " <" . $senderEmail . ">"; $success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );} // Return an appropriate response to the browserif ( isset($_GET["ajax"]) ) { echo $success ? "success" : "error";} else {?><html> <head> <title>Thanks!</title> </head> <body> <?php if ( $success ) echo "<p>Thanks for sending your message! We'll get back to you shortly.</p>" ?> <?php if ( !$success ) echo "<p>There was a problem sending your message. Please try again.</p>" ?> <p>Click your browser's Back button to return to the page.</p> </body></html><?php}?> ?? Thanks in advance!
  5. There is also this javascript code thats in the header of the HTML page I'm trying to get the form to work on: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script><script type="text/javascript">var messageDelay = 2000; // How long to display status messages (in milliseconds)// Init the form once the document is ready$( init );// Initialize the formfunction init() { // Hide the form initially. // Make submitForm() the form's submit handler. // Position the form so it sits in the centre of the browser window. $('#contactForm').hide().submit( submitForm ).addClass( 'positioned' ); // When the "Send us an email" link is clicked: // 1. Fade the content out // 2. Display the form // 3. Move focus to the first field // 4. Prevent the link being followed $('a[href="#contactForm"]').click( function() { $('#content').fadeTo( 'slow', .2 ); $('#contactForm').fadeIn( 'slow', function() { $('#senderName').focus(); } ) return false; } ); // When the "Cancel" button is clicked, close the form $('#cancel').click( function() { $('#contactForm').fadeOut(); $('#content').fadeTo( 'slow', 1 ); } ); // When the "Escape" key is pressed, close the form $('#contactForm').keydown( function( event ) { if ( event.which == 27 ) { $('#contactForm').fadeOut(); $('#content').fadeTo( 'slow', 1 ); } } );}// Submit the form via Ajaxfunction submitForm() { var contactForm = $(this); // Are all the fields filled in? if ( !$('#senderName').val() || !$('#senderEmail').val() || !$('#message').val() || !$('#validate').val() ) { // No; display a warning message and return to the form $('#incompleteMessage').fadeIn().delay(messageDelay).fadeOut(); contactForm.fadeOut().delay(messageDelay).fadeIn(); } else { // Yes; submit the form to the PHP script via Ajax $('#sendingMessage').fadeIn(); contactForm.fadeOut(); $.ajax( { url: contactForm.attr( 'action' ) + "?ajax=true", type: contactForm.attr( 'method' ), data: contactForm.serialize(), success: submitFinished } ); } // Prevent the default form submission occurring return false;}// Handle the Ajax responsefunction submitFinished( response ) { response = $.trim( response ); $('#sendingMessage').fadeOut(); if ( response == "success" ) { // Form submitted successfully: // 1. Display the success message // 2. Clear the form fields // 3. Fade the content back in $('#successMessage').fadeIn().delay(messageDelay).fadeOut(); $('#senderName').val( "" ); $('#senderEmail').val( "" ); $('#message').val( "" );$('#validate').val( "" ); $('#content').delay(messageDelay+500).fadeTo( 'slow', 1 ); } else { // Form submission failed: Display the failure message, // then redisplay the form $('#failureMessage').fadeIn().delay(messageDelay).fadeOut(); $('#contactForm').delay(messageDelay+500).fadeIn(); }}</script> and this in the body: <div id="sendingMessage" class="statusMessage"><p>Sending your message. Please wait...</p></div><div id="successMessage" class="statusMessage"><p>Thanks for sending your message! We'll get back to you shortly.</p></div><div id="failureMessage" class="statusMessage"><p>There was a problem sending your message. Please try again.</p></div><div id="incompleteMessage" class="statusMessage"><p>Please complete all the fields in the form before sending.</p></div> Anything I need to edit here?
  6. Ok, just for heads up, I'm useless at PHP!! I assume you are talking about this code: if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") {} I know you are trying to help, but I am clueless to what to do?What code do I need to add? Thanks guys ...
  7. Hi, Thanks so much for actually responding on a step by step basis!! Ok, removed what you said above and tested the form, but now the the error message comes up whether I put in the correct captcha code or wrong captcha code. Did I do anything wrong, heres what my php form looks like now: <?php// Define some constantsdefine( "RECIPIENT_NAME", "Joe Soap" );define( "RECIPIENT_EMAIL", "JoeSoap@myemail.com" );define( "EMAIL_SUBJECT", "Visitor Message" );// Read the form values$success = false;$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : "";$senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : "";$message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : "";session_start();include("verification_image.class.php");$image = new verification_image();if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") { }// If all values exist, send the emailif ( $senderName && $senderEmail && $message ) { $recipient = RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">"; $headers = "From: " . $senderName . " <" . $senderEmail . ">"; $success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );}// Return an appropriate response to the browser?><html> <head> <title>Thanks!</title> </head> <body> <?php if ( $success ) echo "<p>Thanks for sending your message! We'll get back to you shortly.</p>" ?> <?php if ( !$success ) echo "<p>There was a problem sending your message. Please try again.</p>" ?> <p>Click your browser's Back button to return to the page.</p> </body></html><?php?> ...
  8. Hi, I downloaded a lighbox php form from http://www.elated.co...orm-jquery-php/ which is exactly what I want BUT, I also want to add a captcha to the form! I don't have much knowledge about PHP and I've been trying to figure this out: When I test the form and fill in the Captcha, to my surprise, it goes through 100% with no faults but if I purposely type the incorrect code in the captcha and click send, the lightbox returns a message "sending your message, please wait" and that message doesn't go away. The message I want to see and what is supposed to come up is "There was a problem sending your message. Please try again". I feel I'm so close to getting this right, please could you let me know what is wrong with my php below: <?php// Define some constantsdefine( "RECIPIENT_NAME", "Joe Soap" );define( "RECIPIENT_EMAIL", "JoeSoap@myemail.com" );define( "EMAIL_SUBJECT", "Visitor Message" );// Read the form values$success = false;$senderName = isset( $_POST['senderName'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['senderName'] ) : "";$senderEmail = isset( $_POST['senderEmail'] ) ? preg_replace( "/[^\.\-\_\@a-zA-Z0-9]/", "", $_POST['senderEmail'] ) : "";$message = isset( $_POST['message'] ) ? preg_replace( "/(From:|To:|BCC:|CC:|Subject:|Content-Type:)/", "", $_POST['message'] ) : "";session_start();include("verification_image.class.php");$image = new verification_image();if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") { header('Location: http://www.testing123.co.za/fail.htm'); exit;}// If all values exist, send the emailif ( $senderName && $senderEmail && $message ) { $recipient = RECIPIENT_NAME . " <" . RECIPIENT_EMAIL . ">"; $headers = "From: " . $senderName . " <" . $senderEmail . ">"; $success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );}// Return an appropriate response to the browserif ( isset($_GET["ajax"]) ) { echo $success ? "success" : "error";} else {?><html> <head> <title>Thanks!</title> </head> <body> <?php if ( $success ) echo "<p>Thanks for sending your message! We'll get back to you shortly.</p>" ?> <?php if ( !$success ) echo "<p>There was a problem sending your message. Please try again.</p>" ?> <p>Click your browser's Back button to return to the page.</p> </body></html><?php}?> The code I added to try get the Captcha working is: session_start();include("verification_image.class.php");$image = new verification_image();if (($image->validate_code($_POST['validate']) ? "true" : "false") == "false") { header('Location: http://www.testing123.co.za/fail.htm'); exit;} When you fill in the form and put the incorrect captcha code in, I want the error message: "There was a problem sending your message. Please try again" to return in the lightbox like its supposed to and NOT go to location address: http://www.testing123.co.za/fail.htm. So basically all I want is for that error message to show! Please me know, thanks in advance!!
  9. Hi, No, I'm not that advanced, so I wouldn't know how to do that, hence why I am asking on this forum.
  10. Hi, Thanks ... though I have no idea what code to put and where to put the code?
  11. Hi, I am busy testing out a lightbox form that I'm working on and I've got all to work except the "success" or "thank you" page.Basically I want the user to fill in the online form and when the they are click 'submit', the "thank you" message or page resolves in the same lightbox that the form was in. Go to www.testing123.co.za/test.htm and click on that link you see saying "AJAX SuperBox".The lightbox is opening up an HTML page within in the test.htm page (basically acting like an iFrame?).When I click submit, the page resolves to the success.htm page (which it should) but not in the lightbox frame. I don't want visitors to leave the test.htm page. My headers at the bottom of my process php form shows as: '; $headers = "From: $from\r\nBCC:{$bcc}\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($to, $subject, $sBodyNew, $headers); header('Location: http://www.testing123.co.za/success.htm'); ?> I assume the Location url above needs code added to it so that it works within the lightbox? Or is there an easier way to do this? Thanks guys!
  12. Hi, When saying that I can't give out Database login details and that I should install wordpress instread - I get this reply:
  13. Its a client who hosting his website (not a wordpress site) with me and its another company who my client bought a wordpress plugin from who wants my MySQL details....
  14. Hi Guys, thanks for your input ... they say they need it to install wordpress, thats why they need that database information. Shouldn't I just install it and then give them the login password to their wordpress control panel?
  15. Hi, Quick question ...I've got someone asking me to create a database on my servers MySQL and they are asking for login information, ie: host, database name, database username and database password.Is this information safe to give out? Not recommended? Can they ever in future access my MySQL and delete / manipulate databases that I have there already? Let me know, thanks. R.
×
×
  • Create New...