Jump to content

champbronc2

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by champbronc2

  1. Wouldn't it just be easier to have a script search for the current date in that format though? With %...%?
  2. But then when I do that, the format is in a 0000-00-00 format..
  3. It is php. Users without referer: <b><? $checkpemaile = mysql_query("SELECT * FROM users WHERE referer='' AND date LIKE %curdate% AND visits>0"); $pemail_existe = mysql_num_rows($checkpemaile);
  4. OK I have a table and it has lastlogdate inserted as a VARCHAR in a format looking like such: "October 6, 2008 -3:50 PM" I am trying to do this: Select * From users where referer='' AND date LIKE %curdate% But I need so that current date is in the format of Full month name, Day number (w/o zero) and year. And it needs to really search in this format assuming October 6, 2008is the date : %October 6, 2008% What should my line of code look like?
  5. I have this in my code: $lastlogdate = CURDATE(); But the webpage gives the error Fatal error: Call to undefined function curdate() in /home/champbux/public_html/login.php on line 54
  6. How can I change the column to an interger data type? I am new sorry
  7. OK I have a table, and I want to sort it by who has the most visits. I do this: Select * From users Where referer = '' ORDER BY visits DESC; So I'd have someone with 9 visits and another person with 86 visits. But it lists 9 before 86... It seems to be sorting by the first digit from the left, when I need to to sort by the greatest number.. And like it'd list 9 before 65 or 54 and so on. How can I fix this?
  8. require('config.php'); $query24 = mysql_query("SELECT confirmed FROM users WHERE username = '$nicke'") or die(mysql_error()); $query123 = mysql_fetch_array($query24); if($query123 = 0) { echo "Activate your account via email please."; }else{ OK what I am trying to do is get the value for confirmed from the users table where the username is = $nicke ($nicke is their nickname/username) For some reason it still lets users which have a 0 in the confirmed value login. If the confirmed column is 1 or something else it means they confirmed their account. Here is the entire page. <? session_start(); if ($_POST['username']) { if( strtolower($_POST['code'])!= strtolower($_SESSION['texto'])){ include('header.php'); echo "<br><br>SECURITY CODE ERROR... "; include('footer.php'); exit(); } //Comprobacion del envio del nombre de usuario y password require('funciones.php'); $username=uc($_POST['username']); $password=uc($_POST['password']); if ($password==NULL) { echo "Login Incorrect. Try again."; }else{ require('config.php'); $query = mysql_query("SELECT username,password FROM users WHERE username = '$username'") or die(mysql_error()); $data = mysql_fetch_array($query); if($data['password'] != $password) { echo "Login incorrect. Try again"; }else{ $query = mysql_query("SELECT username,password FROM users WHERE username = '$username'") or die(mysql_error()); $row = mysql_fetch_array($query); mysql_close($con); $nicke=$row['username']; $passe=$row['password']; require('config.php'); $query24 = mysql_query("SELECT confirmed FROM users WHERE username = '$nicke'") or die(mysql_error()); $query123 = mysql_fetch_array($query24); if($query123 = 0) { echo "Activate your account via email please."; }else{ //90 dias dura la cookie setcookie("usNick",$nicke,time()+7776000); setcookie("usPass",$passe,time()+7776000); $lastlogdate = date("F j, Y - g:i a"); $lastip = getRealIP(); require('config.php'); $querybt = "UPDATE users SET lastlogdate='$lastlogdate', lastiplog='$lastip' WHERE username='$nicke'"; mysql_query($querybt) or die(mysql_error()); mysql_close($con); ?> <META HTTP-EQUIV="REFRESH" CONTENT="0;URL=members.php"> <? } } } }else{ ?> <? include('header.php'); ?> <h3>Login</h3> <br /> <a href="register.php">New User Register Free Account</a> <br> <a href="recoverpwd.php">Lost password?</a> <br><br> <div align="center"><div id="form"> <fieldset> <legend>Login</legend> <form action='login.php' method='POST'> <table width="400" border="0" align="center"> <tr> <td width="150" align="left"><p><label>Username</label></p></td> <td width="250" align="left"><input type='text' size='15' maxlength='25' name='username' autocomplete="off"value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Password</label></p></td> <td width="250" align="left"><input type='password' size='15' maxlength='25' name='password' autocomplete="off" value="" tabindex="2" /></td> </tr> <tr> <td width="150" align="left"><p><label>Security Code </label></p></td> <td width="250" align="left"><input type='text' size='3' maxlength='3' name='code' autocomplete="off" class="securitycode" value="" tabindex="3" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="left"><img src="image.php?<?php echo $res; ?>" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="right"><input type="submit" value="Enter" class="submit" tabindex="4" /> </td> </tr> </table> </form> </fieldset> </div></div> <? include('footer.php'); ?> <? } ?> And then here is a SS of my database
  9. Parse error unexpect T_ELSE on line 46 I think it was. <? session_start(); if ($_POST['username']) { if( strtolower($_POST['code'])!= strtolower($_SESSION['texto'])){ include('header.php'); echo "<br><br>SECURITY CODE ERROR... "; include('footer.php'); exit(); } //Comprobacion del envio del nombre de usuario y password require('funciones.php'); $username=uc($_POST['username']); $password=uc($_POST['password']); if ($password==NULL) { echo "Login Incorrect. Try again."; }else{ require('config.php'); $query = mysql_query("SELECT username,password FROM users WHERE username = '$username'") or die(mysql_error()); $data = mysql_fetch_array($query); if($data['password'] != $password) { echo "Login incorrect. Try again"; }else{ $query24 = mysql_query("SELECT confirmed FROM users WHERE username = '$username'"); $query1 = mysql_fetch_array($query24); if($query1 != 1) { echo "Activate your account via email please."; }else{ $query = mysql_query("SELECT username,password FROM users WHERE username = '$username'") or die(mysql_error()); $row = mysql_fetch_array($query); mysql_close($con); $nicke=$row['username']; $passe=$row['password']; //90 dias dura la cookie setcookie("usNick",$nicke,time()+7776000); setcookie("usPass",$passe,time()+7776000); $lastlogdate = date("F j, Y - g:i a"); $lastip = getRealIP(); require('config.php'); $querybt = "UPDATE users SET lastlogdate='$lastlogdate', lastiplog='$lastip' WHERE username='$nicke'"; mysql_query($querybt) or die(mysql_error()); mysql_close($con); ?> <META HTTP-EQUIV="REFRESH" CONTENT="0;URL=members.php"> <? } } }else{ ?> <? include('header.php'); ?> <h3>Login</h3> <br /> <a href="register.php">New User Register Free Account</a> <br> <a href="recoverpwd.php">Lost password?</a> <br><br> <div align="center"><div id="form"> <fieldset> <legend>Login</legend> <form action='login.php' method='POST'> <table width="400" border="0" align="center"> <tr> <td width="150" align="left"><p><label>Username</label></p></td> <td width="250" align="left"><input type='text' size='15' maxlength='25' name='username' autocomplete="off"value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Password</label></p></td> <td width="250" align="left"><input type='password' size='15' maxlength='25' name='password' autocomplete="off" value="" tabindex="2" /></td> </tr> <tr> <td width="150" align="left"><p><label>Security Code </label></p></td> <td width="250" align="left"><input type='text' size='3' maxlength='3' name='code' autocomplete="off" class="securitycode" value="" tabindex="3" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="left"><img src="image.php?<?php echo $res; ?>" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="right"><input type="submit" value="Enter" class="submit" tabindex="4" /> </td> </tr> </table> </form> </fieldset> </div></div> <? include('footer.php'); ?> <? } ?> I would not get the error when this piece of code was not there: }else{ $query24 = mysql_query("SELECT confirmed FROM users WHERE username = '$username'"); $query1 = mysql_fetch_array($query24); if($query1 != 1) { echo "Activate your account via email please."; But I need that code so that only verified members can login. Any idea what I am doing wrong??
  10. I did. I can't find any information on multiplication. Any help?
  11. So should it look like: echo "You have been registered correctly $username. Please confirm your email address in order to login. If you fail to receive it please contact us. Please check your spam folder as well"; $coder = "SELECT id FROM `users` WHERE `username` = CONVERT( _utf8 '$username' USING latin1 ) COLLATE latin1_swedish_ci"; $codes = mysql_fetch($coder); $code = md5($codes); $sql = mysql_query("INSERT INTO users (ccode) VALUES ('$code')"); ?
  12. Warning: md5() expects parameter 1 to be string, resource given in /home/champbux/public_html/register.php on line 208 ? Line 205 to 209 reads as such: echo "You have been registered correctly $username. Please confirm your email address in order to login. If you fail to receive it please contact us. Please check your spam folder as well"; $coder = "SELECT id FROM `users` WHERE `username` = CONVERT( _utf8 '$username' USING latin1 ) COLLATE latin1_swedish_ci"; $codes = mysql_query($coder); $code = md5($codes); $sql = mysql_query("INSERT INTO users (ccode) VALUES ('$code')"); Also another error is Parse error: syntax error, unexpected T_STRING in /home/champbux/public_html/verify.php on line 26 The page is: <? include('config.php'); // Passkey that got from link $passkey=$_GET['code']; $tbl_name1="users"; // Retrieve data from table where row that match this passkey $sql1="SELECT * FROM $tbl_name1 WHERE confirm_code ='$passkey'"; $result1=mysql_query($sql1); // If successfully queried if($result1){ // Count how many row has this passkey $count=mysql_num_rows($result1); // if found this passkey in our database, retrieve data from table "temp_members_db" if($count==1){ $sql2="INSERT INTO users(confirmed)VALUES('1'); $result2 = mysql_query($sql2); } // if not found passkey, display message "Wrong Confirmation code" else { echo "Wrong Confirmation code"; } // if successfully moved data from table"temp_members_db" to table "registered_members" displays message "Your account has been activated" and don't forget to delete confirmation code from table "temp_members_db" if($result2){ echo "Your account has been activated"; } } ?> I am sorry for sucking at php so bad.. Any help is appreciated.
  13. I am getting the error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/champbux/public_html/register3.php on line 214 Line 214 is bolded. What is wrong?? <? session_start(); ?> <? include('header.php'); ?> <? if(isset($_COOKIE["usNick"]) && isset($_COOKIE["usPass"])) { ?> <a href="#" onClick="window.location.reload()">Reload Page</a></b> <? include('footer.php'); ?> <? exit(); } ?> <? // incluimos archivos necesarios require('config.php'); //require('admin/funciones.php'); if (isset($_POST["username"])) { if( strtolower($_POST['code'])!= strtolower($_SESSION['texto'])){ echo "<br><br>SECURITY CODE ERROR... "; include('footer.php'); exit(); } // Declaramos las variables $firstname = $_POST["firstname"]; $surname = $_POST["surname"]; $username = $_POST["username"]; $password = $_POST["password"]; $cpassword = $_POST["cpassword"]; $email = $_POST["email"]; $cemail = $_POST["cemail"]; $pemail = $_POST["pemail"]; $address1 = $_POST["address1"]; $address2 = $_POST["address2"]; $city = $_POST["city"]; $state = $_POST["state"]; $zip = $_POST["zip"]; $country = $_POST["country"]; $paymentmethod = $_POST["paymentmethod"]; // comprobamos que no haya campos en blanco if($firstname==NULL|$surname==NULL|$username==NULL|$password==NULL|$cpassword==NULL|$email==NULL|$cemail==NULL|$pemail==NULL|$country==NULL|$paymentmethod==NULL) { echo "All Fields Required"; }else{ // sanitizamos las variables $firstname = uc($firstname); $surname = uc($surname); $username = uc($username); $password = uc($password); $cpassword = uc($cpassword); $email = limpiar($email); $cemail = limpiar($cemail); $pemail = limpiar($pemail); $address1 = limpiar($address1); $address2 = limpiar($address2); $city = limpiar($city); $state = limpiar($state); $zip = limpiar($zip); $country = limpiar($country); $paymentmethod = limpiar($paymentmethod); // limitamos el numero de caracteres $username=limitatexto($username,15); $password=limitatexto($password,15); $cpassword=limitatexto($cpassword,15); $email=limitatexto($email,100); $cemail=limitatexto($cemail,100); $pemail=limitatexto($pemail,100); $country=limitatexto($country,150); // comprobamos que tengan un minimo de caracteres minimo($username); minimopass($password); // &#191;Coinciden las contrase&#241;as? if($password!=$cpassword) { echo "Passwords Do Not Match"; }else{ // &#191;Coinciden los emails? if($email!=$cemail) { echo "Emails Do not Match"; }else{ // Comprobamos que sea un email valido ValidaMail($email); // Comprobamos que sea un email valido ValidaMail($pemail); // Comprobamos que no se haya creado otra cuenta desde la misma ip $laip = getRealIP(); if($laip!="127.0.0.1") { $checkip = mysql_query("SELECT ip FROM users WHERE ip='$laip'"); $ip_exist = mysql_num_rows($checkip); } if ($ip_exist>0) { echo "Error: You have already created an account."; }else{ // Comprobamos que el nombre de usuario, email y el email de AlertPay no existan $checkuser = mysql_query("SELECT username FROM users WHERE username='$username'"); $username_exist = mysql_num_rows($checkuser); $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'"); $email_exist = mysql_num_rows($checkemail); $checkpemail = mysql_query("SELECT pemail FROM users WHERE pemail='$pemail'"); $pemail_exist = mysql_num_rows($checkpemail); if ($email_exist>0|$username_exist>0) { echo "Username or Email Already in Use."; }else{ if ($pemail_exist>0) { echo "Your PayPal Address is Already in Use."; }else{ // Si se ha introducido un referer comprobamos que exista if ($_POST["referer"] != "") { // Sanitizamos la variable $referer = limpiar($_POST["referer"]); $referer=limitatexto($referer,15); $checkref = mysql_query("SELECT username FROM users WHERE username='$referer'"); $referer_exist = mysql_num_rows($checkref); if ($referer_exist<1) { // En caso de no existir el referer damos un mensaje de error echo "Error: The referrer you entered doesn't exist"; include('footer.php');exit(); }else{ // Si todo parece correcto procedemos con la inserccion $sqlz = "SELECT * FROM users WHERE username='$referer'"; $resultz = mysql_query($sqlz); $myrowz = mysql_fetch_array($resultz); $numero=$myrowz["referals"]; $sqlex = "UPDATE users SET referals='$numero' +1 WHERE username='$referer'"; $resultex = mysql_query($sqlex); } } // Si todo parece correcto procedemos con la inserccion $joindate = date("F j, Y"); $query = "INSERT INTO users (firstname, surname, username, password, ip, email, pemail, referer, address1, address2, city, state, zip, country, paymentmethod, joindate) VALUES('$firstname','$surname','$username','$password','$laip','$email','$pemail','$referer','$address1','$address2','$city','$state','$zip','$country','$paymentmethod','$joindate')"; mysql_query($query) or die(mysql_error()); echo "You have been registered correctly <b>$username</b>. Please confirm your email address in order to login. If you fail to receive it please contact us. Please check your spam folder as well"; $coder = "SELECT id FROM `users` WHERE `username` = CONVERT( _utf8 '$username' USING latin1 ) COLLATE latin1_swedish_ci"; $codes = mysql_query($coder); $code = md5($codes); $dude = "INSERT INTO users (ccode) VALUES ('$code'); mysql_query($dude) or die(mysql_error()); <?php $to = '$email'; $subject = 'ChampBux Registration Confirmation for '$firstname''; $message = "'Hello '$firstname'\n\nYou have been registered at ChampBux with the username '$username'.\n\nIf that is incorrect and you have not registered for ChampBux please disregard this email.\n\nConfirm your email address by copying and pasting the following link into your URL bar. \n\n http://www.champbux.com/emailconfirm.php?c='$code''"; $headers = "From: admin@champbux.com\r\nReply-To: admin@champbux.com"; $mail_sent = @mail( $to, $subject, $message, $headers ); ?> } } } } } } // En caso de no haber sido enviado los datos mostramos el formulario }else{ ?> <div align="center"><div id="form"> <form action="register.php" method="POST"> <fieldset><legend> All Fields Marked With A <font color=red>*</font> Are Required </legend> <h3>Your email address must be valid as a verification email will be sent to it to activate your account!</h3> <table width="400" border="0" align="center"> <tr> <td width="150" align="left"><p><label>First Name<font color=red>*</font></label></p></td> <td width="250" align="left"><input type='text' size='15' maxlength='150' name='firstname' autocomplete="off" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Last Name<font color=red>*</font></label></p></td> <td width="250" align="left"><input type='text' size='15' maxlength='150' name='surname' autocomplete="off" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Username<font color=red>*</font></label></p></td> <td width="250" align="left"><input type='text' size='15' maxlength='25' name='username' autocomplete="off" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Password<font color=red>*</font></label></p></td> <td width="250" align="left"><input type="password" size="25" maxlength="15" name="password" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Confirm Pass<font color=red>*</font></label></p></td> <td width="250" align="left"><input type="password" size="25" maxlength="15" name="cpassword" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Email Address<font color=red>*</font></label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="email" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Confirm Email<font color=red>*</font></label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="cemail" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>PayPal E-mail<font color=red>*</font></label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="pemail" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Address Line 1</label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="address1" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Address Line 2</label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="address2" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>City</label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="city" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>State/County</label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="state" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>ZIP/Postal Code</label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="100" name="zip" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Country<font color=red>*</font></label></p></td> <td width="250" align="left"><select name="country" class="form" autocomplete="off"> <option value="">Select One</option> <option value=United States>United States</option> <option value=Albania>Albania</option> <option value=Algeria>Algeria</option> <option value=Andorra>Andorra</option> <option value=Angola>Angola</option> <option value=Anguilla>Anguilla</option> <option value=Antigua and Barbuda>Antigua and Barbuda</option> <option value=Argentina>Argentina</option> <option value=Armenia>Armenia</option> <option value=Aruba>Aruba</option> <option value=Australia>Australia</option> <option value=Austria>Austria</option> <option value=Azerbaijan Republic>Azerbaijan Republic</option> <option value=Bahamas>Bahamas</option> <option value=Bahrain>Bahrain</option> <option value=Barbados>Barbados</option> <option value=Belgium>Belgium</option> <option value=Belize>Belize</option> <option value=Benin>Benin</option> <option value=Bermuda>Bermuda</option> <option value=Bhutan>Bhutan</option> <option value=Bolivia>Bolivia</option> <option value=Bosnia and Herzegovina>Bosnia and Herzegovina</option> <option value=Botswana>Botswana</option> <option value=Brazil>Brazil</option> <option value=British Virgin Islands>British Virgin Islands</option> <option value=Brunei>Brunei</option> <option value=Bulgaria>Bulgaria</option> <option value=Burkina Faso>Burkina Faso</option> <option value=Burundi>Burundi</option> <option value=Cambodia>Cambodia</option> <option value=Canada>Canada</option> <option value=Cape Verde>Cape Verde</option> <option value=Cayman Islands>Cayman Islands</option> <option value=Chad>Chad</option> <option value=Chile>Chile</option> <option value=China Worldwide>China Worldwide</option> <option value=Colombia>Colombia</option> <option value=Comoros>Comoros</option> <option value=Cook Islands>Cook Islands</option> <option value=Costa Rica>Costa Rica</option> <option value=Croatia>Croatia</option> <option value=Cyprus>Cyprus</option> <option value=Czech Republic>Czech Republic</option> <option value=Democratic Republic of the Congo>Democratic Republic of the Congo</option> <option value=Denmark>Denmark</option> <option value=Djibouti>Djibouti</option> <option value=Dominica>Dominica</option> <option value=Dominican Republic>Dominican Republic</option> <option value=Ecuador>Ecuador</option> <option value=El Salvador>El Salvador</option> <option value=Eritrea>Eritrea</option> <option valueEstonia>Estonia</option> <option value=Ethiopia>Ethiopia</option> <option value=Falkland Islands>Falkland Islands</option> <option value=Faroe Islands>Faroe Islands</option> <option value=Federated States of Micronesia>Federated States of Micronesia</option> <option value=Fiji>Fiji</option> <option value=Finland>Finland</option> <option value=France>France</option> <option value=French Guiana>French Guiana</option> <option value=French Polynesia>French Polynesia</option> <option value=Gabon Republic>Gabon Republic</option> <option value=Gambia>Gambia</option> <option value=Germany>Germany</option> <option value=Gibraltar>Gibraltar</option> <option value=Greece>Greece</option> <option value=Greenland>Greenland</option> <option value=Grenada>Grenada</option> <option value=Guadeloupe>Guadeloupe</option> <option value=Guatemala>Guatemala</option> <option value=Guinea>Guinea</option> <option value=Guinea Bissau>Guinea Bissau</option> <option value=Guyana>Guyana</option> <option value=Honduras>Honduras</option> <option value=HongKong>HongKong</option> <option value=Hungary>Hungary</option> <option value=Iceland>Iceland</option> <option value=India>India</option> <option value=Indonesia>Indonesia</option> <option value=Ireland>Ireland</option> <option value=Israel>Israel</option> <option value=Italy>Italy</option> <option value=Jamaica>Jamaica</option> <option value=Japan>Japan</option> <option value=Jordan>Jordan</option> <option value=Kazakhstan>Kazakhstan</option> <option value=Kenya>Kenya</option> <option value=Kiribati>Kiribati</option> <option value=Kuwait>Kuwait</option> <option value=Kyrgyzstan>Kyrgyzstan</option> <option value=Laos>Laos</option> <option value=Latvia>Latvia</option> <option value=Lesotho>Lesotho</option> <option value=Liechtenstein>Liechtenstein</option> <option value=Lithuania>Lithuania</option> <option value=Luxembourg>Luxembourg</option> <option value=Madagascar>Madagascar</option> <option value=Malawi>Malawi</option> <option value=Malaysia>Malaysia</option> <option value=Maldives>Maldives</option> <option value=Mali>Mali</option> <option value=Malta>Malta</option> <option value=Marshall Islands>Marshall Islands</option> <option value=Martinique>Martinique</option> <option value=Mauritania>Mauritania</option> <option value=Mauritius>Mauritius</option> <option value=Mayotte>Mayotte</option> <option value=Mexico>Mexico</option> <option value=Mongolia>Mongolia</option> <option value=Montserrat>Montserrat</option> <option value=Morocco>Morocco</option> <option value=Mozambique>Mozambique</option> <option value=Namibia>Namibia</option> <option value=Nauru>Nauru</option> <option value=Nepal>Nepal</option> <option value=Netherlands>Netherlands</option> <option value=Netherlands Antilles>Netherlands Antilles</option> <option value=New Caledonia>New Caledonia</option> <option value=New Zealand>New Zealand</option> <option value=Nicaragua>Nicaragua</option> <option value=Nigeria>Nigeria</option> <option value=Niue>Niue</option> <option value=Norfolk Island>Norfolk Island</option> <option value=Norway>Norway</option> <option value=Oman>Oman</option> <option value=Palau>Palau</option> <option value=Panama>Panama</option> <option value=Papua New Guinea>Papua New Guinea</option> <option value=Peru>Peru</option> <option value=Philippines>Philippines</option> <option value=Pitcairn Islands>Pitcairn Islands</option> <option value=Poland>Poland</option> <option value=Portugal>Portugal</option> <option value=Qatar>Qatar</option> <option value=Republic of the Congo>Republic of the Congo</option> <option value=Reunion>Reunion</option> <option value=Romania>Romania</option> <option value=Russia>Russia</option> <option value=Rwanda>Rwanda</option> <option value=Saint Vincent and the Grenadines>Saint Vincent and the Grenadines</option> <option value=Samoa>Samoa</option> <option value=San Marino>San Marino</option> <option value=S&#227;o Tom&#233; and Pr&#237;ncipe>S&#227;o Tom&#233; and Pr&#237;ncipe</option> <option value=Saudi Arabia>Saudi Arabia</option> <option value=Senegal>Senegal</option> <option value=Seychelles>Seychelles</option> <option value=Sierra Leone>Sierra Leone</option> <option value=Singapore>Singapore</option> <option value=Slovakia>Slovakia</option> <option value=Slovenia>Slovenia</option> <option value=Solomon Islands>Solomon Islands</option> <option value=Somalia>Somalia</option> <option value=South Africa>South Africa</option> <option value=South Korea>South Korea</option> <option value=Spain<>Spain</option> <option value=Sri Lanka>Sri Lanka</option> <option value=St. Helena>St. Helena</option> <option value=St. Kitts and Nevis>St. Kitts and Nevis</option> <option value=St. Lucia>St. Lucia</option> <option value=St. Pierre and Miquelon>St. Pierre and Miquelon</option> <option value=Suriname>Suriname</option> <option value=Svalbard and Jan Mayen Islands>Svalbard and Jan Mayen Islands</option> <option value=Swaziland>Swaziland</option> <option value=Sweden>Sweden</option> <option value=Switzerland>Switzerland</option> <option value=Taiwan>Taiwan</option> <option value=Tajikistan>Tajikistan</option> <option value=Tanzania>Tanzania</option> <option value=Thailand>Thailand</option> <option value=Togo>Togo</option> <option value=Tonga>Tonga</option> <option value=Trinidad and Tobago>Trinidad and Tobago</option> <option value=Tunisia>Tunisia</option> <option value=Turkey>Turkey</option> <option value=Turkmenistan>Turkmenistan</option> <option value=Turks and Caicos Islands>Turks and Caicos Islands</option> <option value=Tuvalu>Tuvalu</option> <option value=Uganda>Uganda</option> <option value=Ukraine>Ukraine</option> <option value=United Arab Emirates>United Arab Emirates</option> <option value=United Kingdom>United Kingdom</option> <option value=Uruguay>Uruguay</option> <option value=Vanuatu>Vanuatu</option> <option value=Vatican City State>Vatican City State</option> <option value=Venezuela>Venezuela</option> <option value=Vietnam>Vietnam</option> <option value=Wallis and Futana Islands>Wallis and Futuna Islands</option> <option value=Yemen>Yemen</option> <option value=Zambia>Zambia</option> </select></td> </tr> <tr> <td width="150" align="left"><p><label>Payment Method<font color=red>*</font></label></p></td> <td width="250" align="left"><select name="paymentmethod" class="form" autocomplete="off"> <option value="">Select One</option> <option value=PayPal>PayPal</option> <? require('config.php'); $sql = "SELECT * FROM site"; $result = mysql_query($sql); $row = mysql_fetch_array($result); mysql_close($con); $chequepayouts = $row['chequepayouts']; if($chequepayouts == "yes") { ?> <option value=Cheque>Check</option> <?}?> </select></td> </tr> <tr> <td width="150" align="left"><p><label>Referrer</label></p></td> <td width="250" align="left"><input type="text" size="25" maxlength="15" name="referer" value="<? echo limpiar($_GET["r"]); ?>" autocomplete="off" class="field" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"><p><label>Terms of Service<font color=red>*</font></label></p></td> <td width="250" align="left">By Registering With <?php include("sitename.php"); ?> You Are Agreeing To Our <a href="tos.php">Terms Of Service</a></td> </tr> <tr> <td width="150" align="left"><p><label>Security code:<font color=red>*</font></label></p></td> <td width="250" align="left"><input type="text" size="5" maxlength="5" name="code" autocomplete="off" class="securitycode" value="" tabindex="1" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="left"><img src="image.php?<?php echo $res; ?>" /></td> </tr> <tr> <td width="150" align="left"> </td> <td width="250" align="right"><input type="submit" value="Enter" class="submit" tabindex="4" /> </td> </tr> </table> </form> </fieldset> </div></div> <? } ?> <? include('footer.php'); ?>
  14. OK, So the problem is bolded. It keeps saying that something is wrong with that. I am trying to make it do this: Multiply 3 by the difference of days between Now and the date a member joined. Can anyone correct the script, and explain?
  15. If I am correct, all that means is that their days are more than 0. That's not the issue.
  16. I have this: $checkpemaile = mysql_query("SELECT * FROM users WHERE referer=''"); $pemail_existe = mysql_num_rows($checkpemaile); What I want is this (roughly, since the problem is that I do not know how to code it correctly!) $checkpemaile = mysql_query("SELECT * FROM users WHERE referer=''"); AND WHERE visits>='4*(currentdate-joindate)'") $pemail_existe = mysql_num_rows($checkpemaile); So what I want it to do is make $checkpemaile not just the number of users whose referer is blank but also must have their visits greater than or equal to the number of days they have been a member. So I need the script to $checkpemaile to meet both requirements. So, if anyone can re-write it correctly it'd be greatly appreciated. I have JUST started php and MySql.
×
×
  • 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.