Jump to content

ravravrav

Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ravravrav's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Sorry im a newbie myself; first thing I thought was: where it says --- $result = mysql_query("SELECT * FROM $table"); change the $table bit to '$table' ?? Might not work but at least thats one thing to cross off lol...
  2. Hi I have this code which isn't fully complete but I'd like to change it in a function so I can call it whenever I need to check if a user is logged in or not: I'd like to put it into something called logincheck.php... [code] //Checks if there is a login cookie if(isset($_COOKIE['my_hash'])) //if there is, it checks to see if my_hash = userhash { $c_user = $_COOKIE['my_username']; $c_hash = $_COOKIE['my_hash'];         $check = mysql_query("SELECT * FROM Users WHERE Username = '$c_user'")or die(mysql_error()); while($info = mysql_fetch_array( $check ))      { if ($c_hash != $info['Userhash']) // not logged in { } else // logged in already { header("Location: users.php"); } } } [/code] Any ideas how I would change it and how to call it from other pages? Thx
  3. Hi I have a very basic registration form which currently adds the data to my Users table with no validation. Can I add validation so that if anything is wrong the validation text will display at the top of the form? eg. 'Please fill in your password' would display at the top of the form etc. ???
  4. I have a page called skills.html where i can add skills to my skills table. <form action="addskill.php" method="post"> Skill name: <input type="text" name="skillname"><br /> Skill description: <input type="textarea" rows="5" cols="20" name="description"><br /> <input type="Submit"> I want to pass skillname and description to addskill.php so that it can add them to the database... how do I do this? This is what I've got so far for addskill.php: <?php $username="x"; $password="x"; $database="x"; mysql_connect(localhost,$username,$password); mysql_close(); @mysql_select_db($database) or die( "Unable to select database"); mysql_query($query); $query = "INSERT INTO skills VALUES ('',$skillname, $description)"; ?> What's the correct way :-\?? Thx
  5. Hi everyone I'm a real newbie to making databases with php and I've been on some database forums getting my tables sorted out. I think I have done that now and used phpMyAdmin to set up the tables fine. I've set up my index.php page which uses 'include' to put my header, footer, menu and content pages together. Now I am also working on my registration form - although the php/sql code is not yet done for that. What I need to do is make the Admin section so I can fill in some of the tables which need data before registration can work (like categories etc).. Should I make my Admin page now then or use something else to fill in those categories first? Also does it matter if a page is .php or .html?? Thanks!
  6. [!--quoteo(post=375758:date=May 21 2006, 02:27 PM:name=eves)--][div class=\'quotetop\']QUOTE(eves @ May 21 2006, 02:27 PM) [snapback]375758[/snapback][/div][div class=\'quotemain\'][!--quotec--] Check for the RSS of the site, big sites usullay have that, you can already feed it to flash since its already in XML format. here's an info on RSS: [a href=\"http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html\" target=\"_blank\"]http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html[/a] [/quote] can you believe it, out of all the sites which would really be cool with an rss feed, this one doesnt have any good ones!! lol thanks for the link i found a great tutorial on parsing rss feeds and displaying them into flash, which is almost exactly what i want! i think the html code in the top 250 movies page is quite straightforward so i thought the php bit to parse it would be easy - - im not sure how the overall thing works. what does the code actually look for or do>??
  7. hi, this is my first post here so apologies if anythings not right... i want to make a simple file for my website which searches a website like imdb.com and puts the top 250 movies into a list made with macromedia flash... anyway i understand that i will need to use xml, php and flash in order to do this. the problem is i dont fully understand how to use php to put the information into an xml file...which is what flash needs to show the data. can anyone explain this or maybe link to a good tutorial for beginners. 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.