Jump to content

mattsolomon

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mattsolomon's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. sorry that hasn't made much sense to me maybe it would help if i tell you the current tables and how they work TABLE: Client_details userid is the session id so changes each time TABLE: events i am going to add another field (full name) but i was just after the method of adding hope this is clear
  2. i have built an event adding script... when the admin adds an event a drop down menu pulls all the users in the DB to create the event for.. i set the option to their full name, but the value to the userid... when it stores it to the database it stores the userid as XXX for example, but i'd like to store in another field their full name according to the userid, how is this acheivable im completly baffled.
  3. thanks, one more thing, when it repeats the 3 events it also copies the first table of "client" "occasion" "location" "date" how can i make it just copy the table with the data in it? insted of copying the tittle table? (if that makes sense)
  4. i have hidden connection details for this example <?php $host=""; // Host name $username=""; // Mysql username $password=""; // Mysql password $db_name=""; // Database name $tbl_name=""; // Table name // Connect to server and select database. mysql_connect("$host", "$username", "$password")or die("cannot connect server "); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name WHERE user = $session->clientid ORDER BY date ASC LIMIT 3;"; $result=mysql_query($sql); while($rows=mysql_fetch_array($result)){ ?> <div style="width:385px;"> <table style="width: 385px; text-align:center;"> <tr> <td style="width: 121px"><h3>Client</h3></td> <td style="width: 100px"><h3>Occasion</h3></td> <td style="width: 80px"><h3>Location</h3></td> <td><h3>Date</h3></td> </tr> </table> <table style="width: 385px"> <tr> <td style="width: 121px"> <p><? echo $rows['clientid']; ?></p> </td> <td style="width: 100px"> <p><? echo $rows['occasion']; ?></p> </td> <td style="width: 80px"> <p><? echo $rows['location']; ?></p> </td> <td> <p><? echo $rows['date']; ?></p> </td> </tr> </table> </div> <? } mysql_close(); //close database ?>
  5. thank you, does that come before or after the ORDER function?
  6. if i want to display upcoming events and only want to show the top 3?
  7. thank you [solved]
  8. im still not getting a result? i've echo'd $q and i get: SELECT * FROM client_details ORDER BY ASC but $result is brining nothing?
  9. at the moment i have my page: addevent.php i have written: $q = "SELECT username " ."FROM ".TBL_USERS." ORDER BY ASC"; $result = $database->query($q); on the database.php page here is what query looks like: then i want to display $result in a drop down menu so i wrote back on addevent.php: <select name="Select1"> <option value="<? echo("$result"); ?>"><? echo("$result"); ?></option> </select>
  10. cant edit can a mod please?
  11. oh aswell here are my email constants: /** * Email Constants - these specify what goes in * the from field in the emails that the script * sends to users, and whether to send a * welcome email to newly registered users. */ define("EMAIL_FROM_NAME", "Stacey Solomon Official"); define("EMAIL_FROM_ADDR", "[email protected]"); define("EMAIL_WELCOME", true);
  12. hello, my website mail now seems to be going into "spam" the IP and URL are not blackisted i did a search but im just wondering is their anything wrong with my coding that could be causing this? [note] it has only just starting going to spam.. week or so... <? /** * Mailer.php class Mailer { /** * sendWelcome - Sends a welcome message to the newly * registered user, also supplying the username and * password. */ function sendWelcome($user, $email, $pass){ $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">"; $subject = "Your Registration Details For StaceyXSolomon"; $body = $user.",\n\n" ."Welcome! You've just registered to the Stacey Solomon VIP Site " ."with the following information:\n\n" ."Username: ".$user."\n" ."Password: ".$pass."\n\n" ."If you ever lose or forget your password, a new " ."password will be generated for you and sent to this " ."email address, if you would like to change your " ."email address you can do so by going to the " ."My Account tab in the VIP Suite.\n\n" ."StaceyXSolomon" ."Support: [email protected] \n" ."------------------------------------------- \n" ."Official Links: \n" ."Competitions: http://staceyxsolomon.com/Competitions \n" ."Youtube: http://youtube.com/StaceyXSolomon/ \n" ."Twitter: http://twitter.com/5taceySolomon/ \n" ."Facebook: http://facebook.com/staceyxfactor/"; return mail($email,$subject,$body,$from); } /** * sendNewPass - Sends the newly generated password * to the user's email address that was specified at * sign-up. */ function sendNewPass($user, $email, $pass){ $from = "From: ".EMAIL_FROM_NAME." <".EMAIL_FROM_ADDR.">"; $subject = "Forgotten Password - StaceyXSolomon"; $body = $user.",\n\n" ."We've generated a new password for you at your " ."request, you can use this new password with your " ."username to log in to Stacey Solomons's VIP Site.\n\n" ."Username: ".$user."\n" ."New Password: ".$pass."\n\n" ."It is recommended that you change your password " ."to something that is easier to remember, which " ."can be done by going to the My Account page " ."after signing in.\n\n" ."StaceyXSolomon" ."Support: [email protected] \n" ."------------------------------------------- \n" ."Official Links: \n" ."Youtube: http://youtube.com/StaceyXSolomon/ \n" ."Twitter: http://twitter.com/5taceySolomon/ \n" ."Facebook: http://facebook.com/staceyxfactor/"; return mail($email,$subject,$body,$from); } }; /* Initialize mailer object */ $mailer = new Mailer; ?>
×
×
  • 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.