Jump to content

w32

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

w32's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. w32

    preg_match_all

    Hello I'm having some trouble trying to get some matches of this text [b] James Gosling[/b], Ph.D (born May 19, 1955 near Calgary, Alberta, Canada) is a famous software developer, best known as the father of the Java programming language. If I was looking in a string for "James Gosling" how can I do to get that match with preg_match_all?
  2. Hello, I am in the need of making a parser. Basically I want a script to parse text, and do something when it finds keywords. How could I parse for a certain word. And then could I keep track of what's already been parsed, so it doesnt do the same thing over and over?
  3. It works somehow like my previous SQL, it brings only the first category, and all of its forums...but hang on I'm thinking on a use of FOR..
  4. Hello guys, me again  :D This time around I'm trying to figure out how to organize some stuff...I've been pulling my hair out for a couple of hours.. (or at least what is left of it).. Crazy as it may sound, I'm trying to make some very, very simple forums for, umm, shall we say for self-learning purposes. And I am in a bit of a trouble you see, I have managed to make scripts to create/delete/edit/ categories & forums but I can't seem to be able to order them correctly :( on the forum home it should be something like Category1 -Forum1 -Forum2 Category2 -Forum1 -Forum2 I have made this SQL query, but it doesnt work entirely, how could I manage this? I mean pulling out all the categories from a dbase, and then displaying all the forums that correspond to a category id, below that category? here's my sql : $category = $db->query('SELECT * FROM forum_categories LEFT JOIN forums ON forum_categories.catid=forums.catid ORDER BY forum_categories.cat_position, forums.position ASC '); It kinda worked but while it showed all the forums, it repeated categories, should I make separate queries to get the categories and the forums?
  5. <?php //##your db script## include("config.php"); if($_GET['uid']) { $id = $_GET['uid']; $get['userdata'] = mysql_query("SELECT * FROM pokebash_users WHERE id='$id'"); $get['userdata'] = mysql_fetch_array($get['userdata']); echo 'Username: ' .$get['userdata']['username'] .'<br />'; echo 'E-mail: ' .$get['userdata']['email'] .'<br />'; echo 'fullname: ' .$get['userdata']['fullname']; } else { //########REDIRECTS TO YOUR HOME PAGE IF UID IS NOT PRESENT IN THE URL######### echo '<meta http-equiv="refresh" content="0;URL=index.php" />'; } ?> That'd work I think :) you should now use something like user.php?id=1  or any id you want
  6. yep though I think it's not impossible, wanted to know if someone knew how to do it :)
  7. better yet give me allllll the fields in your database and info of what they contain, and I'll make you a working script :)
  8. questions the 'maaking_users' field contains the users id or their username?? if it does contain the userid  browsing user.php?uid=1  or any id that's actually in the dbase should bring out your user's info :)
  9. I figured that bit, but how do you would a comparison to the value in the database would work out? in your example I would have to do something like SELECT * FROM news WHERE dateint='$day' and that wouldn't work out, would it?
  10. ooohh should've said that...well show me how you're using post in your script, and I'll try to use file_get_content() (should work just as GET) because fsockopen to my knowledge wouldnt help ya
  11. yip :) you'll still need a form if using POST, lol ;) actually no...wouldnt work in the exact same way... kinda troublesome u know...
  12. mmm as I told you, personally I dont' know any other way to POST information to the server without the use of a form...  :D
  13. No prob ;) Btw there are loads of useful attributes you could use like loop, hidden, and width & height (if hidden is set false) :)
  14. Do it exactly as you'd have done it using the GET method, just use a form like this one: <form action="your-script.php" method="post" enctype="application/x-www-form-urlencoded"> </form>
×
×
  • 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.