Jump to content

Ghezzo

New Members
  • Posts

    6
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Ghezzo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Can't seem to edit my post, but I fixed it. I forgot to connect to the database in the PHP file that was reloaded.
  2. Hello, I have tried to reload a PHP file using jquery for a while now, the PHP file contains a mysql_query that currently gets a number from the database. $result = mysql_query("SELECT * FROM job"); while($row = mysql_fetch_array($result)) { $test = $row['test']; } echo $test; It shows the number the first time, but when I reload it using jquery it's shows up empty. I have used jquery .load and I can see, when using fadeout and fadein, that the div is "reloaded", but the PHP file returns nothing and theres no error in firebug. Also, mysql_query("UPDATE job SET test = test + 1"); updates the number, and I want to get the updated number. Sorry if its hard to understand me, but what I need to do is get the updated number when the mysql_query have been run.
  3. Got it working with this code <?php if(isset($_COOKIE['ID_my_site'])) echo '<a href="members.php">Members Area</a> | <a href="logout.php">Logout</a> | You are logged in as: (Coming soon)'; else echo '<a href="register.php">Register</a> | <a href="login.php">Login</a> | You are not logged in.</a>'; ?>
  4. As I said, I'm very new to PHP But I pretty sure it's cookies.
  5. Hey, what is the easiest way to show certain links for logged in users, and other links for non-logged in users? Like I want to show "Register" and "Login" for non-logged in users and "Members Area" and "Logout" for logged in users. Is there some easy way to do this? And one more thing, a guy told me my site was vulnerable to SQL injections. He said: "Your code is vulnerable for sql injections. You' should pass all your post data through a function like mysql_real_escape()." How do I fix this? I'm very new to PHP.
×
×
  • 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.