Jump to content

premiso

Members
  • Posts

    6,951
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by premiso

  1. Hm, you're right it doesn't work - thanks for the quick response anyway. Relational link? :S I'm a bit new to this Relational databases means that 1 table can link to another by a foreign key. So if these tables are to be related you should have a unique key in each that relates one to another. However, I do not think this is what you want here, as those tables do not seem to need to be related to each other. You just need to run 3 separate queries to get the data you want. If they should be related, then let me know and I can explain a bit more on the relationship part.
  2. (\"$Vmake\",\"$vmodel\",\"$vin\",\"$mileage\",\"$probdescrip\",\" . $_SESSION['userid'] . ")" ; Also for queries use ' insetad of " around the value portion.
  3. curl or file_get_contents then do a stristr on the results, if it is there he is good if not he is not good.
  4. WHERE user_games.status='approved' AND user_toons.status = 'approved' AND user_art.status = 'approved' Is how you would need to do it. I am not sure if this will work, however, since you do not seem to have a relational link between the 3 tables.
  5. You don't have[m] to have gmailed hosted for that to work. It is just recommended as the limit of emails per day goes from 100 to 500. And if your host does not have a [m]mail you will need to use a 3rd party pop server. GMail gives you that pop server to use for free with your account info, so why not use that? Or setup another gmail and use that. Either way you will need an email/password to authenticate to any pop/mail server you want to connect to and send email through. If you want to use, say your ISPs POP server then check out phpmailer as that script will allow for that.
  6. Use sessions to store the username in/retrieve it. As rhoodesa says, it is a horrible idea since forms are easy to manipulate the data.
  7. http://www.vulgarisoip.com/category/phpgmailer/ Works great for me.
  8. I love 3NF databases!
  9. First the short tags <?= are not recommended instead use the full <?php tag. For bluesouls version to work it would actually need to be <?php echo isset($userinf['clan'])?"- <a href=\"cforum.php\">Clan forum</a><br>\n":"";?> Now to have that menu item displayed it would be like <?php echo ($userinf['level'] > 100)?"- <a href=\"extraitem.php\">Extra Menu Item</a><br>\n":"";?>
  10. You have alot of duplicate code and unnecessary code. <?php function viewClient($party, $sort = "none"){ if($party == "all"){ $tableEcho = "<table border=0 cellpadding=2 cellspacing=5 width=%100><tr><td bgcolor=black><b><font color=white><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_id\">Client ID</a></font></B></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_firstname\">First Name</a></b></td> <td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_lastname\">Last Name</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_address\">Address</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_city\">City</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_zip\">Zip Code</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_state\">State</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_email\">Email</a></b></td><td><b> </b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_cell\">Cell Number</b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_home\">Home Number</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_fax\">Fax Number</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_partyid\">Party Name</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_under\">Under 18 years old</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_hunter\">Hunter</a></b></td><td><b><a href=\"".$_SERVER['PHP_SELF']."?sort=cl_partycontact\">Party Contact</b></td></tr>"; if($sort != "none"){ $query = mysql_query("SELECT * FROM hrclienta ORDER BY '$sort'"); }else{ $query = mysql_query("SELECT * FROM hrclienta ORDER BY cl_id"); } $tr1 = "<tr bgcolor=\"#655E54\">"; $tr2 = "<tr bgcolor=\"#C1BAB1\">"; }else { $tableEcho = "<table border=0 cellpadding=5 cellspacing=5 width=300 bgcolor=white><tr><td><b>Client ID</B></td><td><b>First Name</b></td> <td><b>Last Name</b></td><td><b>Address</b></td><td><b>City</b></td><td><b>Zip Code</b></td><td><b>State</b></td><td><b>Email</b></td><td><b> </b></td><td><b>Home Number</b></td><td><b>Fax Number</b></td><td><b>Party Name</b></td><td><b>Under 18 years old</b></td><td><b>Hunter</b></td><td><b>Party Contact</b></td></tr>"; $tr1 = "<tr bgcolor=\"#DDD2C3\">"; $tr2 = "<tr bgcolor=\"#DDD2C8\">"; $query = mysql_query("SELECT * FROM hrclienta WHERE cl_partyid = $party "); } echo $tableEcho; $rowcount = 0; while($viewclients = mysql_fetch_array($query)){ $cl_id = $viewclients['cl_id']; $cl_firstname = $viewclients['cl_firstname']; $cl_lastname = $viewclients['cl_lastname']; $cl_address = $viewclients['cl_address']; $cl_city = $viewclients['cl_city']; $cl_zip = $viewclients['cl_zip']; $cl_state = $viewclients['cl_state']; $cl_email = $viewclients['cl_email']; $cl_cell = $viewclients['cl_cell']; $cl_home = $viewclients['cl_home']; $cl_fax = $viewclients['cl_fax']; $cl_partyid = $viewclients['cl_partyid']; $cl_partyname = getPartyName($cl_partyid); $cl_under = $viewclients['cl_under']; $cl_hunter = $viewclients['cl_hunter']; $cl_partycontact = $viewclients['cl_partycontact']; if(($rowcount%2) == 0){ $trEcho = $tr1; }else { $trEcho = $tr2; } ++$rowcount; echo $trEcho . "<td>$cl_id</td><td>$cl_firstname</td><td>$cl_lastname</td><td>$cl_address</td><td>$cl_city</td><td> $cl_zip</td><td>$cl_state</td><td>$cl_email</td><td>$cl_cell</td><td>$cl_home</td><td>$cl_fax</td><td>$cl_partyname</td></tr>"; } echo "</table>"; } ?> Indented properly and cleaned up alot of code. See if that fixes the issue or not/
  11. Ah you are talking about actually linking a reply to a reply. You would need a recursive function for that if I am not mistaken, and it would be multiple queries in that case. You could, however, is have a"replyto" and a "originalid" then put the original ID and pull out by that then sort by threadid, replytoid and that should work.
  12. MD5 is a 1-way hash. There is no way to view the actual password, just the hashed version. It is this way so some people do not get too smart for themselves and try to hack certain accounts using that password; I would suggest leaving it as a 1-way hash.
  13. Show the full view client code.
  14. Absolute links are the way to go. You can generate them like this: <?php define("HOST", "http://" . $_SERVER['HTTP_HOST'] . "/"); $folder=""; // the subdirectory the main script is in if any define("IMG_INC", HOST . "images/"); ?> Then just use IMG_INC in your CSS file like so <?php include constants.php ?> .style { background= url(<?php echo IMG_INC; ?>background.jpg); } You would need to change .css to .php but that is much easier to do and is dynamic with no guess work. That is my opinion anyhow.
  15. The kicker is without your table structure it is hard to really help. It would go something like this, you have a thread table. In this you have a parentid set where if this is not 0 then the thread is a reply. You would then send a parent/threadid if that is present you query selecting all rows where parentid is equal to what you sent you would have an OR statement here to OR threadid = passed parent id. Then you would order it by threadid which should put the threads in order, oldest showing first and so on. All done with 1 query.
  16. Here is 1 example of how to do it: $where = array(); $where[]=isset($_POST["bedrooms"]) ? " bedrooms >= '" . $_POST['beds'] . "' ": ''; $where[]=isset($_POST["maxrentpm"]) ? " rentpm <= '" . $_POST["maxrentpm"] . "' ": ''; $where = implode(" && ", $where); $query="SELECT * FROM lettings WHERE $where ORDER BY '".$orderby."'"; Should do what you want. Just rinse and repeat for each variable.
  17. http://www.aeonity.com/frost/php-setcookie-localhost-apache Read that. Also you cannot access a cookie on the page you set it on, you have to reload that page if I remember correctly. EDIT: Another note: echo "HELLO RUMON YOUR CHOSEN VEGETABLE IS $_COOKIE[artichoke]"; Should be echo "HELLO RUMON YOUR CHOSEN VEGETABLE IS {$_COOKIE['vegetable']}";
  18. Post some code/SQL if you want help.
  19. how? i mean, do you put it in the query? but there are alot of people who are supposed to be excluded. hmmm... i dont really understand what your trying to say... sori WHERE downloaded = 1 Should exclude them all given that you set a specific variable to tell when their document has been downloaded.
  20. Make the form in it's own php file, then for the names have a variable $addOrEdit then define this in the main script what the user is doing then in the form php file have that variable set in the right places and viola the form works for both.
  21. If I am not mistaken, $that should be $this. Also please use the [ code] and [ /code] tags (no initial space).
  22. There is something wrong with the post variables contact your host and ask about it.
  23. Yea, if print_r is disabled do this: foreach ($_POST as $key => $val) echo "key :: $key => value :: $val <br />"; And see what that prints.
  24. In the insert.php page do a print_r($_POST); and report back what it prints. See if the data is even coming through.
  25. What did the get_cookie function return?
×
×
  • 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.