Jump to content

Davie33

Members
  • Posts

    191
  • Joined

  • Last visited

About Davie33

  • Birthday 01/19/1978

Contact Methods

  • Website URL
    http://www.games-flash.co.uk/

Profile Information

  • Gender
    Male
  • Location
    Scotland

Davie33's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi thanks for the reply what do you mean not using md5 ?.
  2. Am not too sure but i think am on the right path with this. Any help would be gr8t thanks. if ($_POST['password'] != $_POST['repeatpassword']) { ?><script>alert("Sorry password,repeatpassword does not match!");</script> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=<?php echo $setting['siteurl'].'index.php?act=register';?>"> <?php exit; }
  3. Hi all hope you can help. For repeat password i was trying get repeat password to check if its the same as password if not same then you must enter password again. How do i code this in and what line would i add it too ?. <div id="center"> <div class="container_box1"> <div id="headergames2">Register:</div> <div class="containbox"><noscript> <?php if (isset($_POST['submit'])) { if ($_POST['recaptcha'] == 'yes') { include($setting['sitepath']."securimage.php"); $img = new Securimage(); $valid = $img->check($_POST['code']); if (!$valid) { $passed = false; } else { $passed = true; } } elseif ($_POST['recaptcha'] == 'no') { $answer = array('10', 'ten'); if(!in_array(strtolower($_POST['security']),$answer)) { $passed = false; } else { $passed = true; } } if ($_POST['username']=='' || $_POST['password']=='' || $_POST['repeatpassword']=='') { ?><script>alert("Sorry username or password,repeatpassword is empty!!");</script> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=<?php echo $setting['siteurl'].'index.php?act=register';?>"> <?php exit; } if ($passed) { $id = yasDB_clean($_POST["id"]); $username = yasDB_clean($_POST["username2"]); $password = md5(yasDB_clean($_POST["password"])); $repeatpassword = md5(yasDB_clean($_POST["repeatpassword"])); $name = yasDB_clean($_POST["name"]); $email = yasDB_clean($_POST["email"]);; $website = yasDB_clean($_POST["website"]); $date = time() + (0 * 24 * 60 * 60); $plays = 0; $points = 0; $randomkey = rand(13649875,98732458); $headers = 'From: '.$setting['sitename'].' <'.$setting['sitename'].'>'; $subject = 'Activate your account at '. $setting['siteurl']; $body = ' Thank you for becomming a member here at '.$setting['sitename'].'\r\n We hope you enjoy our site and what we have to offer.\r\n> To activate your account click the link below:\r\n '.$setting{'siteurl'}.'activated.php?id='.$id.'=code='.$randomkey.' \r\n Thanks, Admin:'; mail($email, $subject, $body, $headers); $stmt=yasDB_select("SELECT * FROM user WHERE username LIKE '$username'"); if($stmt->num_rows == 0){ $stmt = yasDB_insert("INSERT INTO `user` (username, password, repeatpassword, name, email, website, plays, points, date, randomkey, activated) VALUES ('$username','$password','$repeatpassword','$name','$email','$website','$plays','$points', '$date', $randomkey, '0')",false); if ($stmt) { ?><script>alert("Registered: Please check email to activate your account!");</script> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=<?php echo $setting['siteurl'];?>"> <?php exit; } else { $stmt->close(); ?><script>alert("Action Failed");</script> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=<?php echo $setting['siteurl'].'index.php?act=register';?>"> <?php exit; } } else { $stmt->close(); ?><script>alert("Sorry username or email exists try again!!");</script> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=<?php echo $setting['siteurl'].'index.php?act=register';?>"> <?php } } } ?></noscript> <div id="preview"></div><div id="contactBox"> <?php if ($setting['regclosed'] == 'yes') { echo '<center>Registration is now closed.</center>'; } else { ?> <form name="myform" id="form" action="index.php?act=register" method="post" > Username: <br /> <input class="blue" type="text" name="username2" id="username2" size="35" /><br /> Password: <br /> <input class="formsheader" type="password" name="password" id="password" size="35" /> <Br /> Repeat Password: <br /> <input class="formsheader" type="password" name="repeatpassword" id="repeatpassword" size="35" /> <Br /> Name: <br /> <input type="text" name="name" size="35" /> <br /> Email: <br /> <input type="text" name="email" id="email" size="35" /> <br /> Website :<br /> <input type="text" name="website" size="35" /> <br /><br /> <?php if ($setting['userecaptcha'] == "yes") { @session_start(); // securimage captcha ?> <div style="width: 700px; float:left;height: 90px"> <img id="siimage" align="center" style="padding-right: 5px; border: 0" src="<?php echo $setting['siteurl']; ?>includes/securimage/securimage_show.php?sid=<?php echo md5(time()) ?>" /> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="19" height="19" id="SecurImage_as3" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="<?php echo $setting['siteurl']; ?>securimage_play.swf?audio=securimage_play.php&bgColor1=#fff&bgColor2=#284062&iconColor=#000&roundedCorner=5" /> <param name="quality" value="high" /> <param name="bgcolor" value="#284062" /> <embed src="<?php echo $setting['siteurl']; ?>securimage_play.swf?audio=securimage_play.php&bgColor1=#fff&bgColor2=#284062&iconColor=#000&roundedCorner=5" quality="high" bgcolor="#284062" width="19" height="19" name="SecurImage_as3" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <!-- pass a session id to the query string of the script to prevent ie caching --> <a tabindex="-1" style="border-style: none" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = '<?php echo $setting['siteurl']; ?>includes/securimage/securimage_show.php?sid=' + Math.random(); return false"><img src="<?php echo $setting['siteurl']; ?>includes/securimage/images/refresh.gif" alt="Reload Image" border="0" onclick="this.blur()" align="middle" /></a> <div style="clear: both"></div> </div> Security Code:<br /> <input type="text" name="code" id="code" size="12" /><br /><br /> <input name="recaptcha" type="hidden" value="yes" /><?php // end securimage captcha } else { ?>Security Question: five + five = <br /> <input name="security" id="security" type="text" style="border: 1px solid #000;" /><br/> <input name="recaptcha" type="hidden" value="no" /><?php }?> <br/> <input type="submit" name="submit" value="Sign Up" /> </form> <br/>*Email is used to reset a forgotten password only. <?php } ?> </div></div> <div class="clear"></div> </div>
  4. Guys i got it working and thank you for your reply's. Here is what my query looks like if anyone comes to the same problem i had. "SELECT forumtopics.id, forumtopics.subject, forumposts.text, forumposts.date, forumposts.name FROM forumtopics INNER JOIN forumposts ON forumposts.topic = forumtopics.id ORDER BY forumposts.id DESC LIMIT 5" This query works as its on my site.
  5. Hi am not that good mysql i am still learning. this is what am aiming for We have more than 5 topics so.... Only the last five topics that had a post made would show. The username and date is pulled from forumposts and then we pull the subject of that topic that had the post to look like this..... -------------------------------------------------------------------------------- Latest topics - mostviewe username - date topic name date "My known issues for minix" username - date "low quality thumbnails" username - date "What would you like in ne" username - date "PurpleBot is back" username - date So say i made a post on "What would you like in ne" It will then look like this..... ------------------------------------------------------------------------------- What would you like in ne username - date Latest topics - mostviewe username - date My known issues for minix username - date low quality thumbnails username - date PurpleBot is back username - date
  6. Here is error. Error number: 0 - MySQL error Syntax error near '.Subject ON '.subject ON maxforumtopics.subject, forumposts.id=forumtopics.id ORDER by forump' on line 1 Query: "SELECT forumposts.id, forumposts.name,forumposts.date,forumtopics.subject FROM forumposts INNER JOIN (SELECT forumposts.id, MAX(id) AS lastid FROM forumtopics GROUP BY forumposts.id) maxforumtopics.subject ON maxforumtopics.subject, forumposts.id=forumtopics.id ORDER by forumposts.id asc limit 5"
  7. Thanks on the info been at this for 2 days still not getting it to work correct. I still need your help on this please. <div class="nav_box"><div class="nav">Latest Posts</div> <div class="nav_box2"> <?php $query = yasDB_select("SELECT * FROM forumposts"); if ($query->num_rows == 0) { echo '<center><h3>We have no posts yet!</h3></center>'; } else { $query = yasDB_select("SELECT forumposts.id, forumposts.name,forumposts.date,forumtopics.subject FROM forumposts INNER JOIN (SELECT forumposts.id, MAX(id) AS lastid FROM forumtopics.id GROUP BY forumposts.id) maxforumtopics.subject ON maxforumtopics.subject, forumposts.id=forumtopics.id ORDER by forumposts.id asc limit 5"); while($row = $query->fetch_array(MYSQLI_ASSOC)) { $subject = $row['subject']; $date = $row['date']; $name = $row['name']; if ($setting['seo'] == 'yes') { $topiclink = $setting['siteurl'].'forumtopics/'.$row['id'].'/1.html'; } else { $topiclink = $setting['siteurl'] . 'index.php?act=forumtopics&id='.$row['id']; } ?> <a href="<?php echo $topiclink;?>"><?php echo $subject;?></a><br /><?php echo $name;?> - <?php echo $date;?><br> <?php } } $query->close(); ?> </div> </div>
  8. I thought i had it working with this query but no.I am getting closer to fixing it but if any one knows a fix for this please post back. $query = yasDB_select("SELECT forumposts.id, forumposts.name,forumposts.date,forumtopics.subject FROM forumposts INNER JOIN forumtopics ON forumposts.id=forumtopics.id ORDER by id desc limit 5");
  9. Hi all am in need of your help am wanting to join two sql tables so that i show name of topic but username and date of the last post. Am really finding this abit hard to do if any would please help thank you. I know my query is not correct but really do need the help. <?php$query = yasDB_select("SELECT * FROM forumposts");if ($query->num_rows == 0) {echo '<center><h3>We have no posts yet!</h3></center>';}else {$query = yasDB_select("SELECT forumposts.id,forumposts.date,forumposts.name,forumtopics.id,forumtopics,subject FROM forumposts, forumtopics WHERE forumtopics.subject ORDER by id asc limit 5");while($row = $query->fetch_array(MYSQLI_ASSOC)) {$subject = $row['subject'];$date = $row['date'];$name = $row['name'];if ($setting['seo'] == 'yes') {$topiclink = $setting['siteurl'].'forumtopics/'.$row['id'].'/1.html';} else {$topiclink = $setting['siteurl'] . 'index.php?act=forumtopics&id='.$row['id'];}?><a href="<?php echo $topiclink;?>"><?php echo $subject;?></a><br /><?php echo $name;?> - <?php echo $date;?><br><?php }}$query->close();?> Tables for sql. forumtopics = id,subject,cat,name,date forumposts = id,text,date,name,topic name = username topic = topic id from forumtopics cat is the catid from forum sql which we don't need to worry about forum sql i mean. and topic is the topic id from forumtopics I need to join forumtopics = subject with forumposts = id username and date.
  10. Guys its ok i got it thanks anyway.
  11. Hi am hoping yous guys can help me with my sql. Here is sql ALTER TABLE `settings` MODIFY `theme` varchar(12) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'minix_26' I want to alter the table "settings` and modify the theme from minix_25 to what you see above ^. Only thing is when i enter it in the sql phpmyadmin it returns saying. " MySQL returned an empty result set (i.e. zero rows). (Query took 0.0650 sec)"
  12. Fook me i already fixed it on another file thanks guys for the help anyway. I really thought i had lost the file that i fixed .
  13. Am not to sure but i think this has solved it. <?php $catcheck = yasDB_select("SELECT `name` FROM `categories` WHERE `id` = " . $row['category']); $catname = $catcheck->fetch_array(MYSQLI_ASSOC); if ($id = $row['category']) { if ($setting['seo']=='yes') { ?> <a href="<?php echo $setting['siteurl'];?>category/<?php echo $row['category'];?>/1.html" onMouseover="showhint('<b><?php echo ucfirst($catname['name']);?></b>',this, event, 'auto')"><?php echo ucfirst($catname['name']);?></a> <?php } else { ?> <a href="<?php echo $setting['siteurl'];?>index.php?act=cat&id=<?php echo $row['category'];?>" onMouseover="showhint('<b><?php echo ucfirst($catname['name']);?></b>',this, event, 'auto')"><?php echo ucfirst($catname['name']);?></a> <?php } } ?>
  14. Hi what am looking for is when i go to the game page that code above is to give the name of the category the game is from. For some reason the code does work but still give out the error as thats whats on my site atm is that code. Check my link below then go to the main game page on any game you will see the name of the cat the game is from.
  15. It not my code i had it made for me that's why i posted on here for help am kinda lost with it. Sry am not an expert on php . How can i fix it ?.
×
×
  • 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.