Jump to content

unidox

Members
  • Posts

    557
  • Joined

  • Last visited

    Never

Everything posted by unidox

  1. Here: <?php echo "<h2>Send Message</h2><p> <form action=\"mail2.php?action=sendmsg\" method=\"post\"> <input type=\"radio\" name=\"type\" value=\"1\" class=\"text_box\"> Email<br /> <input type=\"radio\" name=\"type\" value=\"2\" checked class=\"text_box\"> Private Message<br /> To<br /> <input type=\"text\" name=\"to\" class=\"text_box\"><p> From<br /> <select name=\"from\" size=\"1\" class=\"text_box\">"; $sql = mysql_query("SELECT * FROM `members` WHERE site = '$Z' ORDER BY `username` = '" . mysql_escape_string($username) . "' ASC"); while($row = mysql_fetch_array($sql)) { $us = $row["username"]; print "<option value=\"" . $us . "\">" . $us . "</option> <option value=\"" . $us . "@eaglelegend.com\">" . $us . "@eaglelegend.com</option>"; } print "</select><p> Subject<br /> <input type=\"text\" name=\"subject\" size=\"30\" class=\"text_box\"><p> Message<br /> <textarea rows=\"6\" cols=\"60\" nowrap name=\"message\" class=\"text_box\"></textarea><p> <input type=\"submit\" value=\" Send Message \" class=\"text_box\"></form>"; ?> You didnt need the ending }
  2. Here, I cleaned up your code: <? echo "<h2>Send Message</h2><p> <form action=\"mail2.php?action=sendmsg\" method=\"post\"> <input type=\"radio\" name=\"type\" value=\"1\" class=\"text_box\"> Email<br /> <input type='radio' name='type' value='2' checked class='text_box'> Private Message<br /> To<br /> <input type=\"text\" name=\"to\" class=\"text_box\"><p> From<br /> <select name=\"from\" size=\"1\" class=\"text_box\">"; $sql = mysql_query("SELECT * FROM `members` WHERE site = '$Z' ORDER BY `username` = '" . mysql_escape_string($username) . "' ASC"); while($row = mysql_fetch_array($sql)) { $us = $row["username"]; print "<option value=\"" . $us . "\">" . $us . "</option> <option value=\"" . $us . "@eaglelegend.com\">" . $us . "@eaglelegend.com</option>"; } print "</select><p>"; ?>
  3. Try this: print "<h2>Send Message</h2><p> <form action='/mail2.php?action=sendmsg' method='post'> <input type='radio' name='type' value='1' class='text_box'> Email<br> <input type='radio' name='type' value='2' checked class='text_box'> Private Message<br> To<br> <input type='text' name='to' class='text_box'><p> From<br> <select name='from' size='1' class='text_box'>"; <?php $sql = mysql_query("SELECT * FROM `members` WHERE `site`=\"$Z\" ORDER BY `username`='".mysql_escape_string($username). ASC"); while($row = mysql_fetch_array($sql)) { $us = $row["username"]; print "<option value=" . $us . ">" . $us . "</option> <option value=\"" . $us . "@eaglelegend.com\">" . $us . "@eaglelegend.com</option>"; } ?> print "</select><p>";
  4. unidox

    Help

    Well I have figured out you cant use ORDER BY and LIMIT in the same query. Anyone know an alternative?
  5. You need a public smtp server, google it.
  6. Can we see html and php code?
  7. unidox

    Help

    I keep getting not a valid mysql resource. Here is my code: $q = mysql_query("SELECT * FROM `pcp_users` ORDER BY 'user_id' DESC WHERE level >= '$lvl' AND level != '1' AND username != '$user' AND conf = '1' LIMIT $start, $limit");
  8. Apache HTTP Web Server. Google for tutorials, you can also try WAMP
  9. Try moving session_start() to the top of the login script.
  10. unidox

    Wrong?

    Got it to work: $url = "site.com?key=" . SITE_LIC . "&ref=" . $_SERVER["HTTP_REFERER"] . ""; $lic = fopen($url, "r"); $lic = fgets($lic, 4096); define('LIC_CHECK', $lic); if (LIC_CHECK != 1) { header("Location: http://www.site.com/index.php?p=lic_invalid"); exit(); }
  11. here: <?php print "<table width='100%' class='tbl-border'>\n"; print "<tr><th class='tbl2'>Date</th><th class='tbl2'>Home Team</th><th class='tbl2'>Score</th><th class='tbl2'>Visiting Team</th><th class='tbl2'>Score</th>"; if ($show_fields) print "<th class='tbl2'>Field</th>\n"; $queryscores="SELECT sportsdb_wins.winid, sportsdb_wins.windate, sportsdb_wins.wintime, sportsdb_wins.game_date, sportsdb_wins.game_time, sportsdb_wins.rf, sportsdb_wins.ra, sportsdb_wins.wincomments, sportsdb_wins.field, sportsdb_wins.winortie, sportsdb_teams2.teamname AS winningteam, sportsdb_teams.teamname AS losingteam FROM sportsdb_wins, sportsdb_teams AS sportsdb_teams2, sportsdb_teams, sportsdb_divs WHERE sportsdb_teams.teamdiv = sportsdb_divs.divid AND sportsdb_divs.conference = $confid AND sportsdb_teams2.teamid = sportsdb_wins.winner AND sportsdb_teams.teamid = sportsdb_wins.loser AND sportsdb_wins.winortie != 3"; // Sort by team if specified if (isset($_POST['teamtosort']) && $_POST['teamtosort'] != 'all') { $teamtosort = intval($_POST['teamtosort']); $queryscores .= " AND (sportsdb_wins.winner = $teamtosort OR sportsdb_wins.loser = $teamtosort)"; } $queryscores .= " ORDER BY wintime ASC"; $resultscores=mysql_query($queryscores); $numscores=mysql_numrows($resultscores); while ($scores = mysql_fetch_array($resultscores, MYSQL_ASSOC)) { if ($scores['confid'] > '11') { $windateheader=$scores['windate']; $windateformatted=date("l, F j",$windateheader); $time = date('g:i a',$scores['wintime']); $time = ($time == "12:00 am")? "<font color='#ff0000'>TBA</font>" : $time; print "<tr><td class='tbl1'>$windateformatted</td><td class='tbl1'>{$scores['winningteam']}</td>"; print "<td class='tbl1' align='center'><b>{$scores['rf']}</b></td> <td class='tbl1'>{$scores['losingteam']}</td>"; print "<td class='tbl1' align='center'><b>{$scores['ra']}</b></td>"; if ($show_fields) print "<td class='tbl1'>{$scores['field']}</td>"; if ($scores['winortie'] == 2 || $scores['winortie'] == 5) print " (ff)"; print "</td></tr>\n"; } } echo "</table>\n"; ?>
  12. unidox

    Wrong?

    I have this code: $url = "site.com?key=" . SITE_LIC . "&ref=" . $_SERVER["HTTP_REFERER"] . ""; $lic = fopen($url, "r"); $lic = fgets($lic, 4096); if ($lic == 1) { echo "Verified"; } else { echo "Suspended"; } If I echo $lic it says 1, but if I use the if statement, it keeps saying suspended. Whats wrong?
  13. unidox

    @

    Ok, I was also wondering what does -> do? I have seen in some scripts people have ->. Like $db->query
  14. unidox

    @

    What is the @ in php used for? Like @mysql_connect
  15. unidox

    Backup

    I have a database, and I was wondering how do I backup using a php script? I dont just want it to be a table, but the whole db. So if they want to re-add something then they can look in the backup and enter the SQL in a php script.
  16. unidox

    $_POST?

    I normally have the html/css design on index.php and use: if ($_GET['page']) { include($_GET['page']); } else { echo "This is the main page"; } But I have seen some sites use index.php and then like about.php. I was wondering do they have the design on each of the pages or are they using post or something. Thanks
  17. Include the config, and then use define()
  18. unidox

    Search

    I have: $_SERVER["HTTP_REFERER"] and $lic, and what I am trying to do is do a search like, search for www. in $_SERVER["HTTP_REFERER"]. How would I do that?
  19. I did that and echo fopen does Resource id #3. Whats wrong
  20. I have a script on Server 1, and another script on Server 2. What I want is to have lic.php on server 1 and use get to check to see if the license is valid. Like: $lic = $_GET['lic']; $url = $_SERVER["HTTP_REFERER"]; $q = mysql_query("SELECT * FROM `db` WHERE lic = '$lic'"); if (mysql_num_rows($q) == 1) { echo "1"; //lic is valid } else { echo "0"; //lic is invalid } I was just wondering how I would have server 2 use get to activate the script on server 1. Thanks
×
×
  • 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.