Jump to content

ajicles

Members
  • Posts

    112
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ajicles's Achievements

Member

Member (2/5)

0

Reputation

  1. I had a variable wrong $lastPostReturn = mysql_fetch_assoc($lastPost); and the LIMIT helped Thanks
  2. I tried executing SELECT * FROM `posts` ORDER BY `posts`.`postCreated` DESC in PHPmyAdmin and it just ordered them and not really selecting anything D:
  3. I am having a problem with my script not returning anything! I echo the variable usually it will say ARRAY and it has something in it.. Nothing at all it coming up no errors I have put or die in it, nothing. I tried error_reporting(E_ALL); , still nothing. If someone can help me with this, I will greatly appreciate it. ~AJ error_reporting(E_ALL); //Get Catagorys and echo $getCatagorys = mysql_query("SELECT * FROM `catagory`") or die("Query failed with error: ".mysql_error()); while($row = mysql_fetch_array($getCatagorys, MYSQL_ASSOC)){ echo ' <tr> <td class="catagoryTD" width="550">'.$row['catagoryTitle'].'</td> <td class="catagoryTD" width="75"><center>Threads</center></td> <td class="catagoryTD" width="75"><center>Posts</center></td> <td class="catagoryTD" width="170"><center>Last Post</center></td> </tr>'; //Get SubCatagorys and echo $catagoryID = $row['catagoryID']; $getSubCatagory = mysql_query("SELECT * FROM `subcatagory` where catagoryID = '$catagoryID'"); while($subrow = mysql_fetch_array($getSubCatagory, MYSQL_ASSOC)){ $subCatagory = $subrow['subcatagoryID']; //Get Stats for number of threads $threads = mysql_query("SELECT * FROM entry WHERE subcatagoryID = '$subCatagory'") or die(mysql_error()); $num_threads = mysql_num_rows($threads); //Get Stats for number of entrys(posts) $posts = mysql_query("SELECT * FROM posts WHERE subcatagoryID = '$subCatagory'") or die(mysql_error()); $num_posts = mysql_num_rows($posts); //Find newest post and find what thread it is from $lastPost = mysql_query("SELECT * FROM `posts` ORDER BY `posts`.`postCreated` DESC") or die(mysql_error()); while($lastPostReturn = mysql_fetch_array($getSubCatagory, MYSQL_ASSOC)){ echo $lastPostReturn; } //Grab User and thread number and date $lastPostUser = $lastPostReturn['postUser']; $lastPostCreated = $lastPostReturn['postCreated']; $lastPostEntry = $lastPostReturn['entryID']; //Find the title of the thread and generate URL\ $lastPostThread = mysql_query("SELECT * FROM `entry` WHERE entryID = '$lastPostEntry'"); while($lastPostThreadReturn = mysql_fetch_array($lastPostThread, MYSQL_ASSOC)){ } echo ' <tr> <td><a href="catagory.php?id='.$subrow['subcatagoryID'].'">'.$subrow['subcatagoryTitle'].'</a></td> <td><center>'.$num_threads.'</center></td> <td><center>'.$num_posts.'</center></td> <td>'.$lastPostThreadReturn['text'].'<br>'.$lastPostCreated.'<br>'.$lastPostUser.'</td> </tr>'; } }
  4. I was wonder how I could make some BBcode for my messaging system I made for a website. I made some simple ones like just by replace [ red ] with font color etc. I want to know how to do something like this: [ url = http://google . ca] Google [ / url ] without the spaces. ~AJ
  5. Hah never mind I fixed it. I forgot to query and missing a column...
  6. Hello I am having a problem trying to write to a database using mysql real escape so there wont be any injection attacks. I trying using myrealescape and it returns errors: Notice: Use of undefined constant messageTo - assumed 'messageTo' in D:\wamp\www\Legit Gaming Upload\LGU\includes\mailCompose.php on line 17 Notice: Use of undefined constant messageSubject - assumed 'messageSubject' in D:\wamp\www\Legit Gaming Upload\LGU\includes\mailCompose.php on line 17 Notice: Use of undefined constant messageBody - assumed 'messageBody' in D:\wamp\www\Legit Gaming Upload\LGU\includes\mailCompose.php on line 17 I add in the single quotes and it doesn't write either. Dreamweaver says that either single quotes or not there is no syntax errors. What going on? I have used it like this before: ('$ID','" . mysql_real_escape_string($_POST[post_content]) . "') and no problems.. ~AJ <?php require_once('connect.php'); if(isset($_COOKIE['user'])){}else{ header( 'Location: members.php'); } if (isset($_POST['sendBtn'])){ $messageFrom = $_COOKIE['user']; $messageTo = $_POST['messageTo']; $hash = $messageTo.$messageFrom.time(); $hash = md5($hash); mysql_select_db("majik"); $sql="INSERT INTO messagesystem(ID, hash, messageTo, messageFrom, messageSubject, messageBody, messageDate, messageRead, messageDelete) VALUES ('','$hash','" . mysql_real_escape_string($_POST['messageTo']) . "','$messageFrom','" . mysql_real_escape_string($_POST['messageSubject']) . "','" . mysql_real_escape_string($_POST['messageBody']) . "','0','0')"; echo '<center>Your message was sent to: '.$messageTo.'</center>'; } ?>
  7. ajicles

    $_GET

    Options +FollowSymLinks RewriteEngine On RewriteRule .* index.php Doesn't work.... Can someone please help me? There are there are 11 examples and none are helping me
  8. ajicles

    $_GET

    Don't make a noob over think lol. I have tried this: Redirect 301 / index.php And it doesn't redirect it to index.php Within the index.php I will just get the referrer then get rid of anything I don't want and then do the sql queries etc.. Error trap it so people can't injection attack and wont accept letters. Its not simple I googled it I got this: httpd.apache.org/docs/2.0/mod/mod_rewrite.html and I don't see anything I need.
  9. I have made a website that people can go to and create like pages for Faceboook and people can like them. I am currently changing the format of the website. I need to work on a way to make a dynamic directory so Facebook can tell the difference between like.php?id=1 and like.php?id=2 the only way I can do this is to make a directory for every like would which use alot of space. So if its dynamic its only one page, so it would be like/2 and Facebook would read it. Here is the link to my website: New Format, Old format
  10. ajicles

    $_GET

    I believe I would have to write a script for apache. Some 404 pages display what you were trying to look for on the page. I just want to know how that works. Also I found a website that says I could use CGI to load dynamic content. I haven't coded CGI and don't know how to script something like this up. I host my website on a free web hosting and to enable CGI I used .htaccess Options +ExecCGI AddHandler cgi-script cgi pl If someone could help me that would be greatly appreciated. ~AJ
  11. ajicles

    $_GET

    I am seen people have dynamic pages that loads the information from a database and then displays that information from the url. EG domain.com/somedirectory/something I have a website that does this but uses domain.com/something.php?id=something . This works great but when I go to try and get the statistics for that page from facebook for number of people that have liked that page. When I go to: http://graph.facebook.com/http://likebook.cz.cc/ It shows me the information: { "id": "**************", "name": "LikeBook", "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs178.ash2/41817_130259343675613_3465_s.jpg", "link": "http://www.facebook.com/pages/LikeBook/130259343675613", "category": "Website", "description": "Collect every like at LikeBook.cz.cc", "fan_count": 3 } But when I try and go to: http://graph.facebook.com/http://likebook.cz.cc/like.php?id=31 It shows me: { "id": "http://likebook.cz.cc/like.php" } So what I need to do is. Make a dynamic page within that sub directory. So that http://likebook.cz.cc/like/31 does grabs the information from line 31 of my database, like http://likebook.cz.cc/like.php?id=31 would do. Thank you ~AJ
  12. I have an error: XML error: XML_ERR_NAME_REQUIRED at line 155771 On line 155771: <key>Comments</key><string>----&#62; www.KRAZYMP3Z..COM &#60;----</string> I have been googling around and found that a person said about my error is: I don't really know what do to now
×
×
  • 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.