Jump to content

Greaser9780

Members
  • Posts

    326
  • Joined

  • Last visited

    Never

Everything posted by Greaser9780

  1. At the end of your queries you don't have single quotes around $userid like this '$userid'
  2. In the code you providing it is showing single quotes around your table name- 'users' - it should be backtics like this `users`. You only want single quotes for your values. The other part I put in about mysql_error was just to show you if there was an error in the query. Then it will tell you what was wrong.
  3. As long as all your queries are from the same db you only need to connect and select db once. In addition you have this for every query: $query="select * from members WHERE userid=$userid"; This is telling it to select nothing from the db. Should be something like select img or something. You need to tell the db what you want selected from it. In your table there is a field that you want brought to the page. What is it?
  4. Also in the form portion where it says textarea you didn't include value="joketext"
  5. Could you please post your current code? Don't need database details as long as you are sure it is connecting.
  6. Is userid in your db table `members`? If so it must be exactly as it is in the table. I got one of those errors earlier today. It turned out the only thing I had wrong was the syntax in my query. I thought it was strang that it said line 1 because line 1 is always <?PHP session_start(); for me.
  7. Sorry,I may be wrong here but try this out. Change this: $query = mysql_query("SELECT 'name' FROM 'users' WHERE 'name' = '" . $_POST['sign_username'] . "'"); to this: $username=$_POST['username'] $query = mysql_query("SELECT name FROM users WHERE name = '$username'" And this: "INSERT INTO 'users' (`name`, `password`, `level`, `signup`, `id`) VALUES ('" . $sign_username . "', '" . $sign_password . "', '" . $sign_level . "', '" . $sign_date . "' , )"); mysql_close(); To this: $SQL="INSERT INTO `users` (`name`, `password`, `level`, `signup`, `id`) VALUES ("' . $sign_username . "', '" . $sign_password . "', '" . $sign_level . "', now() )"; $res=mysql_query($sql)or die(mysql_error());
  8. In you SELECT FROM statement I don't see anything that you tried to select from your table. $query="select * `what?` from members WHERE userid=$userid";
  9. Create your thankyou.html page then insert this in your php: include("thankyou.html"); where you have the echo
  10. I recently used something like this while creating a link to a php file that made a new web page based on info from the db. Basically mid and rid are items found in the database. On the page the link takes you too, you would use $_GET to redefine the variable in the new page. This allows you to do a query using whatever the variable was. It basically allows you to carry over a variable into a new page.
  11. That was the ticket. I figured I was supposed to plug in my type of ID. TYVM Mr.SUPER cool guru guy. Any clues on where I can find more info on this type of thing. Going to be doing alot of these.
  12. Here is the code for my link: <a href=\"stats.php?id=".$row['clan_id']."\">".$row["clan_name"]."</a>
  13. How do I fix that? I am fresh to dynamic links.
  14. I got the following: $sql = SELECT clan_name, wins, losses, logo, message, clan_id FROM bhdsingle where clan_id = '' Number of rows found: 0
  15. <? session_start(); include('db.php'); $clan_id=$_GET['clan_id']; $sql = "SELECT clan_name, wins, losses, logo, message, clan_id FROM bhdsingle where clan_id = '$clan_id'"; $res = mysql_query($sql) or die(mysql_error()); while($r=mysql_fetch_array($res)) { //getting each variable from the table $clan_name=$r["clan_name"]; $message=$r["message"]; $logo=$r["logo"]; $wins=$r["wins"]; $losses=$r["losses"]; echo "$clan_name"; } ?> Why does it not echo?
  16. I have a php file that lists all of the registered clans and some of their stats in a ranked order. In the section of the table where I list the clan name , I wish for it to display the clan name as a link to a php file that will query all of that clans history,stats,logo etc. First off I have no clue how to display a link in php. I have tried numerous ways to do this in html but since it is in the middle of a while statement in php it won't let me. Second I am guessing the link would have to connect to a script such as stats.php that would query the db for the info for the clan name you clicked on and then display it in a series of tables. Anyone have any ideas on any parts of this?
  17. I am looking for a way so when a new clan registers it will create a link on the page that displays all the clans for that game.This link will automatically call a query to my table of clans to retrieve and display the clans stats. I have no clue how to go about this.
  18. Try posting this down in the mssql forum as well. I am sure they will be able to give you plenty of insight on what to look out for and how they differ.
  19. That's how I used it on what I'm developing and it worked fine. Although I also used $list to create a table.
  20. Why not just display everything that doesn't need kept secret. Then if your logged in it grants you access to the pages you need kept secure. This way they can still roam around and check things out and at the same time you can keep secure data secure.
  21. If you created the shout box this might be possible. On the page that displays the shoutbox: Check if user is logged in if yes display shoutbox as normal if no display shoutbox without the input bar(Take away the place where they can input what they want to say.) If you did this you would probably want to include some text below the shoutbox that said you must register and log in to have access to the shoutbox.
  22. I agree. I think option 1 is the best way to go. Should be fairly secure.
×
×
  • 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.