Jump to content

Lamez

Members
  • Posts

    1,686
  • Joined

  • Last visited

    Never

Everything posted by Lamez

  1. ya I was messing around with the code after I said that. It makes a lot more sense after you explained it. Thanks!
  2. That kinda helps. I still do not understand it.
  3. Is there a way where the user can input a number, and that is how many images come up? example: the user inputs 100 in a text field, then the script loads up 100 images. Now I am just using images for an example. How would I do that, a for loop, and if so can I get an example, I am not good with loops.
  4. How can I make the browser go back a page? I been using this: javascript:back(); but it does not work. I use it like: <?php header("Location: javascaript:back();"); ?> -Thanks Guys!
  5. are you guys talking about the pass gate, or the internal link checker?
  6. I have just made a internal link checker, and I do not think there is much you can do with it, but please see what you can do. Here is a link: http://links.krazypicks.com/?url=google.com at the end where it says ?url=google.com, you can change it to yahoo.com and it will check yahoo.com. Thanks Guys! Also take a look at http://krazypicks.com/register.php
  7. I thought there was a way to find out where the user came from. Example: User googles my website, but I redirect them back to the google search. Any way?
  8. Thank you for that little bit of code, it was exactly what I was looking for. Thanks Again!
  9. see that is the thing, I get nothing echoed out! you can test the code here: http://links.krazypicks.com/?url=google.com
  10. I am sorry, but the code you gave me does not echo anything out. Here is how I integrated it. <?php $url = htmlspecialchars($_GET["url"]); $form = array($url); if ($form['url'] != '' && strpos(strtolower($form['url']), 'http://') !== 0) $form['url'] = 'http://'.$form['url']; $url = $form['url']; if (!isset($_GET["url"])){ header("Location: http://www.krazypicks.com"); }else{ echo "<center>You are about to leave KrazyPicks! to an external link. <br>Do you want to continue?"; echo "<br>External Link: ".$url."</center>"; ?> Thanks!
  11. click on start> control panel > add\remove programs then find the add-on and remove it! Hope that help!
  12. Question 1: I am working on a external link checker, but If the user does not add a protocol like http:// or ftp:// or something like that how can I add it to the beginning of the URL? Example: -User input: www.google.com -Code Added: http://www.google.com Question 2 How can I find the address the user came from? -Thanks guys!
  13. ya after I posted that, I felt real dumb. I am sure I can figured it out on my own. Lol thanks anyway.
  14. I was wondering how would I go about making a external link checker? Where if the link is not on the "white list", then it ask the user if they want to continue. I know how to pull the "white list" from the db. But is there a function I could use? Thanks!
  15. I have made this code below, and it is for my index page, it will allow me to edit, or delete one of my entys from the database with the correct URL. Well cmd is not setting, so I am being forced back to my index.php. here is the code: <?php ob_start(); $path = "../../"; $title = "Update Home"; include ($path."main/include/cons/head.php"); if($session->logged_in){ if($session->isAdmin()){ if(!isset($cmd)) { header('Location: '.$path.'index.php'); } if($_GET["cmd"]=="delete") { print '<h2>Topic Deleted.<h2>'; $q = "DELETE FROM `home` WHERE `id`='".$id."'"; mysql_query($q); echo '<p>'; print '<a href="'.$path.'index.php">Back to Home</a></p>'; header("Location: ".$path."index.php"); } if($_GET["cmd"]=="edit") { $r = mysql_query("SELECT * FROM `home` WHERE `id`='".$id."'"); $row = mysql_fetch_array($r); $title = $row['title']; $content = $row['content']; $id = $row['id']; print '<h2>Edit Entry</h2>'; echo '<p>'; ?> <form id="Update" name="Update" method="post" action="edit_top_act.php"> <table width="100%" border="0" bgcolor="#333333"> <tr> <td width="6%"><strong><font color="#FFFFFF">Title</font></strong></td> <td width="94%"><label> <input name="title" type="text" id="title" value="<?php echo $title; ?>" /> (<?php echo $id; ?>)</label></td> </tr> <tr> <td><strong><font color="#FFFFFF">Update</font></strong></td> <td><textarea name="update_text" id="update_text" cols="45" rows="5"><?php echo $content; ?></textarea></td> </tr> <tr> <td><input name="id" type="hidden" id="id" value="<?php echo $id; ?>" /></td> <td><label> <input type="submit" name="submit" id="submit" value="Modify" /> </label><label> <input type="reset" name="reset" id="reset" value="Reset" /> </label></td> </tr> </table> </form> <?php print '<a href="'.$path.'index.php">Back to Home</a>'; echo '</p>'; } }else{ header('Location: '.$path.'index.php'); } }else{ header('Location: '.$path.'index.php'); } include ($path."main/include/cons/foot.php"); ?> Here is my links on the index page: <?php while($row = mysql_fetch_assoc($query)) { echo "<h2>".$row['title']; if($session->logged_in){ if($session->isAdmin()){ echo " <font size='0'><a href=".$path."main/include/admin_index.php?cmd=edit&id=".$row['id'].">Edit Entry(".$row['id'].")</a></font>"; echo " <font size='0'><a href=".$path."main/include/admin_index.php?cmd=delete&id=".$row['id'].">Delete Entry(".$row['id'].")</a></font>"; } } echo "</h2><p>"; echo $row['content']; echo "<br />"; echo "</p>"; } ?> Thanks guys!
  16. Gosh thank you so much. I am too lazy to mess with CSS, lol. This is for my use any ways. I did not setup the database, but Account name is a login, and they also have characters, they can have more than one character. Thank you so much!
  17. ok so what I am trying to do is see who is online, but I have a problem. The name of the account is in one table, and to tell if they are online is in a different table accounts- acct(id) login(acc name) characters id char_name online so I wanna take the the id, and find the account name. Then I wanna find out which char is online. So I think I might have to make 2 loops
  18. ya I am working on cleaning up my code, and no I have not solved it. I think I might need to make another loop.
  19. well dezkit, what is messed up about it? -Thanks Guys!
  20. I cleaned up the code a bit. Nothing Different. <?php define(ACC_SERVER, "localhost"); define(ACC_USER, "usr"); define(ACC_PASS, "pass"); define(ACC_NAME, "name"); mysql_connect(ACC_SERVER, ACC_USER, ACC_PASS); $sql = mysql_query("SELECT * FROM ".ACC_NAME.".characters WHERE `online` = '1'")or die(mysql_error()); $char = mysql_fetch_array($sql); $id = $char['acct']; $char_name = $char['name']; $sql_r = mysql_query("SELECT * FROM ".ACC_NAME.".accounts WHERE `acct` = '$id'")or die(mysql_error()); $on_num = mysql_num_rows($sql_r); ?> <font face="Arial, Helvetica, sans-serif"> <h1 align="center">People Online</h1> <table width="50%" border="0" bgcolor="#666666" align="center"> <tr> <td> <?php if($on_num == (0)){ echo "There are no players online."; } while($acc = mysql_fetch_array($sql_r)){ $acc_name = $acc['login']; echo $acc_name."(".$char_name.") "; } ?></td> </tr> <tr> <td><strong>Total Online</strong>: <font color="#FFFFFF"><?php echo $on_num; ?></font></td> </tr> </table> </font>
  21. also the total number, shows one as well.
  22. alright similar to my last post, but different problem. My script shows who is online, their account name, and their character name. But when there are more than one account logged in, it only shows one person online, when there are more than one. I have no idea what so ever why this is doing this, perhaps you guys do. code: <?php define(ACC_SERVER, "localhost"); define(ACC_USER, "user"); define(ACC_PASS, "pass"); define(ACC_NAME, "name"); $connection_a = mysql_connect(ACC_SERVER, ACC_USER, ACC_PASS); $sql = mysql_query("SELECT * FROM ".ACC_NAME.".characters WHERE `online` = '1'")or die(mysql_error()); $char = mysql_fetch_array($sql); $id = $char['acct']; $name = $char['name']; $sql = mysql_query("SELECT * FROM ".ACC_NAME.".accounts WHERE `acct` = '$id'")or die(mysql_error()); $on_num = mysql_num_rows($sql); ?> <font face="Arial, Helvetica, sans-serif"> <h1 align="center">People Online</h1> <table width="50%" border="0" bgcolor="#666666" align="center"> <tr> <td> <?php if($on_num == (0)){ echo "There are no players online."; } while($char = mysql_fetch_array($sql)){ echo $char['login']; echo "(".$name.")"; echo " "; } ?></td> </tr> <tr> <td><strong>Total Online</strong>: <font color="#FFFFFF"><?php echo $on_num; ?></font></td> </tr> </table> </font>
  23. gosh I forgot the ' ' around $id. I cannot believe that caused it!
  24. ok my scripts shows who is online, and there characters they are using. But if no one is online, I get a mysql error, here is the error: it is talking about this area: <?php while($char = mysql_fetch_array($sql)){ echo $char['login']; echo "(".$name.")"; echo " "; } ?> here is the rest of the code: <?php $sql = mysql_query("SELECT * FROM logon.characters WHERE `online` = '1'")or die(mysql_error()); $char = mysql_fetch_array($sql); $id = $char['acct']; $name = $char['name']; //echo $id; $sql = mysql_query("SELECT * FROM logon.accounts WHERE `acct` = $id"); $on_num = mysql_num_rows($sql); ?> if someone is online it would show something like: account(char_name) Total Online: 1 but I get an error if no one is online. -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.