Jump to content

buzzby

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

buzzby's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi there i have tried using the code instead $query = "SELECT "; $query = preg_replace("/^SELECT +/i","$0 SQL_CALC_FOUND_ROWS ",$query); echo $query; but it brought up more errors. i am using 5.0.4 on the remote server and 5.3.0 on my wamp server. what is the best php version to use? (5.2.11?) hi there also this "SQL_CALC_FOUND_ROWS" is this a command of some sort? i have not seen this before. i am trying to trawl thru another persons php shop. i downloaded the whole shop from one server and trying to put it up on another server. this is one of the 5 errors i am coming up against. anyone had any experience with this?
  2. hi there people i have this code happening with regards to my wamp server. is this something that can be sorted out? would this happen on a normal remote server that has lamp on with the necessary bells and whistles? Deprecated: Function ereg_replace() is deprecated in C:\wamp\www\itinwales\common\classes\class.paging.php on line 22 this is the code on line 22 $query = ereg_replace("^SELECT[[:space:]+]","SELECT SQL_CALC_FOUND_ROWS ",$query); i have not come across coding like this before. is there a way that this can be written to work better or just to atually work? cheers
  3. cheers. figured it out just as a mail came thru. well actually i went into the php.ini file and took out the ;semi colon. all working now. cheers anyway
  4. hi there i am running WAMP Apache Version 2.2.11 PHP Version 5.3.0 MySQL Version 5.1.36 i would like to install cURL on this server as i am getting errors like Fatal error: Call to undefined function curl_init() in C:\wamp\www\itinwales\curlFile.php on line 16 can someone please guide me thru the installation of curl? i have downloaded curl 7.1.95 win32 ssl sspi. inside that dir there is the curl.exe file. was this the right thing to do? what do i need to do in order to get curl to work? thanks in advance for aqny help given Danny
  5. i was wondering if any of you can help me with this. i am getting the error message when inserting into the database. my code is here: $dbhost = 'localhost'; $dbuser = '***'; $dbpass = '***'; $dbname = 'formresults'; $connection = mysql_connect($dbhost, $dbpass, $dbuser) or die(mysql_error()); mysql_select_db($dbname) or die(mysql_error()); $query = "INSERT INTO formflymetothemoon (name, parent_name, age, email, phone, address, postcode, newsletter, otherCompanies) VALUES ('$name', '$parentname', '$age', '$email', '$phone', '$address', '$pcode', '$newsletter', '$other_products')"; mysql_query($query) or die('Error, insert query failed'); i was getting the password issues but now thats fixed and am now getting the ERROR, INSERT QUEREY FAILED message. can you tell me what is wrong with this? my form action is this: <form id="form1" name="form1" method="post" action="promo.php"> my form elements is here: <input name="name" type="text" size="50" maxlength="255" /> <input name="parentname" type="text" size="50" maxlength="255" /> <input name="age" type="text" size="50" maxlength="255" /> <input name="email" type="text" size="50" maxlength="255" /> <input name="phone" type="text" size="50" maxlength="255" /> <input name="address" type="text" size="50" maxlength="255" /> <input name="pcode" type="text" size="50" maxlength="255" /> <input name="newsletter" type="checkbox" value="yes" id="newsletter"/> <input name="other_products" type="checkbox" value="yes" id="other_products" /> <input name="Submit" type="submit" value="Enter Competition" /> </form> any help on this will be really great
  6. <?php if (isset($_POST['submit'])) { $user=""; $host="localhost"; $password=""; $database=""; $connection = mysql_connect($host,$user,$password) or die ("could not connect to server"); $db = mysql_select_db($database,$connection); $sql = "insert into membershipdb(name, address1, address2, address3, pcode, email, website, daynum, evenum, faxnum, audio, video, lighting, computers, avdesign, internetpublishing, projectsystems, webcasting, tvbroadcasting, musicproduction, liveproduction, membership) values ('{$_POST['name']}','{$_POST['address1']}','{$_POST['address2']}','{$_POST['address3']}','{$_POST['pcode']}','{$_POST['email']}','{$_POST['daynum']}','{$_POST['website']}','{$_POST['evenum']}','{$_POST['faxnum']}','{$_POST['audio']}','{$_POST['video']}','{$_POST['lighting']}','{$_POST['computers']}','{$_POST['avdesign']}','{$_POST['internetpublishing']}','{$_POST['projectsystems']}','{$_POST['webcasting']}','{$_POST['tvbroadcasting']}','{$_POST['musicproduction']}','{$_POST['liveproduction']}','{$_POST['membership']}')"; $result = mysql_query($sql) or print(mysql_error()); if (!empty($_POST['CMS'])){ $mail = new MyMailer; $mail->AddAddress($_POST['email']); $mail->Subject = "Thank you for filling out our form"; $mail->Body = 'Hello '.$_POST['lname'].', Thank you for filing out this form . you have selected the College Student Membership. This link will take you to paypal site where you can pay for your membership. \n\n<p>https://www.paypal.com/xclick/business=peterodetunde%40hotmail.com&item_name=College+Student+Membership&item_number=CSM/GMN04&amount=15.00&no_note=1&currency_code=GBP&lc=GB'; exit; } if (!empty($_POST['CMS']) || !empty($_POST['IPM']) || !empty($_POST['IM']) || !empty($_POST['SM']) || !empty($_POST['GM']) || !empty($_POST['PM']) || !empty($_POST['BGM']) || !empty($_POST['PCM'])) { echo "<span class='biggertext'>"; echo "Please return back to the form and choose your membership"; echo "</span>"; echo "<form>"; echo "<input type='button' value='Go Back' onclick='history.back(-1)' class='textstyle'>"; echo "</form>"; exit; } echo "<table class=textstyle1white><tr><td>"; echo 'Hello '.$_POST['name'].', Thank you for your filling out this membership form. <p>A confirmation email is on its way to you with more details regarding your membership choice and price.<p><p>Regards, <br>Gospel Media network'; echo "<table class=textstyle1white><tr><td>"; echo "</tr></td></table>"; echo "<body onLoad=redirect() text=#000000 link=#00FFFF vlink=#C0C0C0>"; } else { ?> <body leftmargin="0" topmargin="0" bgcolor="transparent">//this is where the html table starts....... //........ </body> <? } ?> this is the code for the radio button. what i want is to be able to select which email i send depending on the radio button. each button is connected to a price so the the radio button for a particular price needs to access the email that has the same price in the email. hope this is clear. should the 'exit;' at the end be there or is there something else?
×
×
  • 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.