Jump to content

Kaboom

Members
  • Posts

    98
  • Joined

  • Last visited

    Never

Everything posted by Kaboom

  1. See.. the game is coded in Visual Basic. When the user gets to the end of the game it does this: Set ie = CreateObject("INTERNETEXPLORER.APPLICATION") ie.NAVIGATE "http://www.*****************.blah/score.hopto.submit_scores.php?scr=" & Score1 ie.Visible = True While ie.busy DoEvents Wend Now when the user clicks that it opens up score.hopto.submit_scores.php?scr= and say the user got 537258935 points it would put score.hopto.submit_scores.php?scr=537258935 but now once they get there because it directly opens to that page i need it to post the 537258935 to the next page, which is submit.php thus makign sure they never see the brilliance of this plan But idk how to make it auto post to submit.php because the reason it goes to submit.php is so that they dont see something like submit.php?score=102923&hash=191829 they just see submit.php so again they can't mess with the socres. How would I get about doing this?
  2. Okay so I am making a game and I want a highscores feature. Currently it is set to goto http://www.mysite/score.hopto.submit_scores.php?scr=SCOREGOESHERE then from there I need it to post data to the submit page. The user never gets to see the score.hopto.submit_scores.php to prevent people from cheating their scores and such but I ened to know how to make it post from that page and take the date of scr=SCOREGOESHERE and post SCOREGOESHERE to submit.php without the user ever seeing that page. Currently it just used a header Location thing to send them to submit because there isnt a feature to detect score so how would I make it submit teh score AND redirect them but load the score as score.hopto.submit_scores.php?scr=SCOREGOESHERE and whatever SCOREGOESHERE is is what it will post to the next one?
  3. you have it set as: mail("youremail@email.com", "Subject", "Message here", "Visitors email here"); right? If not set as that, if you do the mail function may be inactive on your server
  4. The way it work is it connects $posts = mysql_query("SELECT * FROM databasenamehere ORDER BY id", $db_id); then prints utput as: $x = 1; while ( $blogpost = mysql_fetch_array( $posts ) ) { if ( $x != 1 ) { echo "<hr>"; } echo "<img src=\"http://www.elegantthemes.com/preview/eNews/wp-content/themes/eNews/timthumb.php?src=http://www.elegantthemes.com/images/sharedthumbs/8.jpg&h=74&w=73&zc=1\" alt=\"Animals\" width=\"73px\" height=\"74px\" /> <h2><a href=\"article.php?id=$blogpost[id]\">$blogpost[subject]</a></h2> <p class=\"info\"><em>author</em>: $blogpost[poster]</p> <p>$blogpost[content]</p>"; $x++; } $blogpost[content] is the one that displays the content of the post or description so i need to limit $blogpost[content] but when i set $string = blogpost[content]; then it makes it display nothing and wierd. it set to load content from every post rather then have certain defined content and array all the posts onto that page. I also need to make is so when it hits 50 posts a page it adds buttons for pages at bottom like: << < Page [1] 2 3 4 ... of 7 > >> thanks for what you've gave me but it's not working for this. When i managed to implement it it didnt show the post with under 300 at all
  5. It didnt work :'( Now it doesnt show them at all... hold on ill try something else
  6. Okay so as you can see here: http://www.stephanddarryn.com/blog/2010/animals/index.php The description doesnt have a character limit, i need it to show only 300 characters bfore it puts... then cut the rest of the desctiption off so they have to view the whole thing to see the whole thing. How would I do this? I need character limit at 300 then if its over that put ... and cut the rest out and then that's it if its lower don't add the ...
  7. Okay I tried doing $level = $_GET["level"]=clean($_GET["level"]); if ($level = "0") { $rankstring = '<strike><font color="#336699">'; } if ($level = "1") { $rankstring = '<font color="#336699">'; } if ($level = "2") { $rankstring = '<b><font color="red">'; } if ($level = "3") { $rankstring = '<b><font color="#666666">'; } if ($level = "4") { $rankstring = '<b><font color="#336699">'; } if ($level = "5") { $rankstring = '<b><font color="#336699">'; } then print it later but its always printing just the last one for everyone
  8. So were coding our own forums for a game system we made an we have the users level setup but now I need to make it do user groups. See the groups are defined by numbers: 0 - banned 1 - registered 2 - donator 3 - mod 4 - admin 5 - owner I have this setup to define ranks $rankstring = "<b><font color='#336699'>"; $row=update_lastVisit($_SESSION["user"][0]); $x = 1; while ( $whosonline = mysql_fetch_array( $res ) ) { if ( $x != 1 ) { echo ", "; } echo "<a href=\"member.php?id=$whosonline[id]\">$rankstring$whosonline[name]</b></font></a></strike>"; $x++; } I need to know how to make it MySql read the row for the level and if there in that group then make their name that color. Like for admins something like if user level is 5 then $rankstring = "html code for admin color"; and have that set ONLY admins as that color and not the other groups. How would I do it like that? The row that the usergroups are read from is 5 if that helps. Can someone help quickly?
  9. It works useing my cases like that and thanks for step 2 and how to I do the hidden value? Like: <input type="hidden" name="option" value="<?php echo $option ?>" /> right?
  10. Well the reason that won't work is because I have it like switch($_GET['step']) { Case "2"; $option = $_POST["option"]; $message = "You picked to donate: <strong><?php echo $option ?></strong> <small><a href='index.php?step=1'>(Change)</a></small><br /> Enter your forum username: <br /> <form method='post' action='index.php?step=3'> <input autocomplete='off' type='text' name='user' title='username' name='username' class='username' value='' /><br /><br /> <input class='submit2' type='submit' value='Next Step' /></form>"; break; Default; break; } and index.php has <?php echo "$message"; ?> Where I want it to print the message strng stuff So its a PHP code INSIDE a php code and then I get encase errors or something and whatever else and it's really confusing.. I jus don't know why its not saving the posted data here's a screenshot http://www.gaming-geeks.net/sig/paypal.png
  11. Okay so I am making a donation script and such to release to the VIP members of my community but for some reason I cant get it to work quite how I want... See I made it so that all the PHP is done on config.php and the everything else goes from index.php but now I need to fix the posting.. When they pick the amount they want and hit enter it takes them to the next step which is Case "2"; $option = $_POST["option"]; $message = "You picked to donate: <strong><?php echo $option ?></strong> <small><a href='index.php?step=1'>(Change)</a></small><br /> Enter your forum username: <br /> <form method='post' action='index.php?step=3'> <input autocomplete='off' type='text' name='user' title='username' name='username' class='username' value='' /><br /><br /> <input class='submit2' type='submit' value='Next Step' /></form>"; break; The first page is Case "1"; $message = "<center><strong>Select an option:</strong><br /><form method='post' action='index.php?step=2'> <select name='option' size='1'> <option value='-1'>Select an option...</option> <option value='$5 USD'>$5 USD</option> <option value='$7 USD'>$7 USD</option> <option value='$10 USD'>$10 USD</option> <option value='$15 USD'>$15 USD</option> <option value='$25 USD'>$25 USD</option> <option value='Custom'>Custom</option> </select><br /><br /><input class='submit1' type='submit' value='Next Step' /></form></center>"; break; Now I need it to take the option they picked and print it where it says you are donating this amount there but nothing is showing up. Then when they click next it has to remember that amount they picked until the very end and their username from that one and print it into the final one which is Case "3"; $message = "<b><i>Checkout Counter</i></b><br /> Forum Username: <strong><?php echo $username ?></strong><br /> Amount to Donate: <strong><?php echo $option ?></strong><br /><br /> <form method='post' action='index.php?step=4'><input class='submit2' type='submit' value='Finish' /></form><br /><br />"; break; But it doesn't show the username OR the amount and that's all I really need to get it to work, the rest is done and looks pretty awesome so .. can someone tell me what I am missing or doing wrong? I tried to add <?php $option = $_POST['option']; ?> onto page one but I get like 3 errors ...
  12. I see the problem here Do this instead DO ' instead of " in the urls inside the echo because its trying to close it
  13. I know this isn't really a helpful hint but try taking the image scroler code on the side from the homepage because it's working there, then add it to those pages?
  14. Or this may work mysql_connect('localhost',$database,$username,$password);
  15. Well ... here is what I have now <?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/core/config.php"; include_once($path); $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/core/func.php"; include_once($path); $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/core/english.php"; include_once($path); function name($name) { global $db_id; $query="select count(*) from users where name='".$name."'"; $result=mysql_query($query, $db_id); $row=mysql_fetch_row($result); return (bool)$row[0]; } $usr=user($_GET["name"]); $subject=clean($_POST["subject"]); // $name=clean($_SESSION["name"]); $inhoud=clean($_POST["inhoud"]); if (($_POST['post'])&&($_SESSION["code"]==$_POST["code"])) { $query="insert into `babys` (`poster`, `subject`, `content`, `date`) values('".$usr."', '".$subject."', '".$inhoud."', now())"; $result = mysql_query($query); if ($result) header('Location: index.php'); else msg("Failed.".mysql_error()); } else { msg($lang['incorCode']); } ?> I commented that one out now. It's only saving "0" into the username no matter what acc I use to post with
  16. Is this on a webserver or your localhost? Like if you buy hosting from a site like hostgator, they give you a username like kaboom then on your connect tables you need to put kaboom_far and the same username and database is a problem ...
  17. Okay I changed it so usr$=user(..whatever); now so that that calls the user thing right? Its $_GET["name"] which needs to call from function name i think ... ugh so confusing! It's only saving 0 in the username spot now!
  18. Okay i got userids now Edit: nevermind, it's just putting 0's in now
  19. OKay so I coded my own blog source because i -thought that would be cool but I have a slight problem in development ... see you can login, goto your profile, register, view stuff and whatever and it all works peachy BUT the posting a new article is messed up. The user can post an article and all is fine, no errors, everything seems to run smoothly but when you check the post in the DB, you can see the whole post EXCEPT the author. Now the form they are using to login saves there session as that user id, like if my username was kaboom and im user #5, it logs me in as user #5. Now I need the post.php (what it uses to save the post from newpost.php) to save either the authors username OR their id so I can load that from a group later when displaying posts.. Here is my code, see if you understand whats going wrong: <?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/core/config.php"; include_once($path); $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/core/func.php"; include_once($path); $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/core/english.php"; include_once($path); function name($name) { global $db_id; $query="select count(*) from users where name='".$name."'"; $result=mysql_query($query, $db_id); $row=mysql_fetch_row($result); return (bool)$row[0]; } $usr=user($_GET[".$name."]); $subject=clean($_POST["subject"]); $name=clean($_SESSION["name"]); $inhoud=clean($_POST["inhoud"]); if (($_POST['post'])&&($_SESSION["code"]==$_POST["code"])) { $query="insert into `babys` (`poster`, `subject`, `content`, `date`) values('".$name."', '".$subject."', '".$inhoud."', now())"; $result = mysql_query($query); if ($result) header('Location: index.php'); else msg("Failed.".mysql_error()); } else { msg($lang['incorCode']); } ?> Why isn't it saving the userid or the username too? Please help <3
  20. Okay the only thing I need now is to make it save the usernames.... any ideas?
  21. that makes sence.. so ($_SESSION["'.name.'"])==($_SESSION["name"]) or what?
  22. Um ... header ('Location: thanks.php'); maybe?
  23. Okay so for some reason it doesn';t know what their username is or something ... What I am trying to do is get it to do this insert into `babys` (`name`, `subject`, `content`, `date`) values('THEIRUSERNAMEHASTOBEHERE', 'SUBJECTOFTHEPOST', 'CONTENTOF THEPOST', now()) I have it saving the subject and the content but It won't save their username in the name spot ... idk how to make it load that so it can save there... Heres my new post.php that works except the name part <?php include "../config.php"; include "../func.php"; include "../english.php"; function name($name) { global $db_id; $query="select count(*) from users where name='".$name."'"; $result=mysql_query($query, $db_id); $row=mysql_fetch_row($result); return (bool)$row[0];; } $usr=user($_GET["id"]); $subject=clean($_POST["subject"]); $name=clean($_SESSION["name"]); $inhoud=clean($_POST["inhoud"]); if (($_POST['post'])&&($_SESSION["code"]==$_POST["code"])) { $query="insert into `babys` (`name`, `subject`, `content`, `date`) values('".$user."', '".$subject."', '".$inhoud."', now())"; $result = mysql_query($query); if ($result) header('Location: index.php'); else msg("Failed.".mysql_error()); } else { msg($lang['incorCode']); } ?> How do i make that save their username into the name spot for THAT post?
  24. Okay ... well I used the clean feature to get rid of the junk but then I have this problem .. Its not registering then as a user. I am working on a string to define them as users .. looks kinda like this function is_user2($name) { global $db_id; $query="select count(*) from users where name='".$name."'"; $result=mysql_query($query, $db_id); $row=mysql_fetch_row($result); return $row[0]; } Now how would I do it like if (($_POST['post'])&&($_SESSION["code"]==$_POST["code"])&&(!is_user)) { so that it forces them to be a user so they can post?
  25. Okay so for name it has to get the users name from the tables users and then post that into the field name of that post so you can tell who the author is... heres the structure of the table its posting in; CREATE TABLE IF NOT EXISTS `babys` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varbinary(45) NOT NULL, `subject` varbinary(45) NOT NULL, `content` varbinary(10240) NOT NULL, `date` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ; Now where it says `name` i need it the put the posters name which is stored in a different table called users ... how?
×
×
  • 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.