Jump to content

shlocko

Members
  • Posts

    8
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Age
    14

shlocko's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ooh okay, thanks so much for the help, I was so confused because I've used this exact code a hundred other times and it's worked, then it just kinda stopped, thanks for clarifying that for me!
  2. OKay so I am trying to make this simply update my mysql server. Can anyone maybe see why this isn't working? The code all works perfectly up until while statement... So if someone maybe sees something wrong? Thanks... <? session_start(); include('nconnect.php'); $uname=$_POST['to']; $result = mysqli_query($con, "SELECT * FROM messages WHERE to='{$uname}' "); $content=$_POST['content']; while($row = mysqli_fetch_array($result)){ mysqli_query($con, "UPDATE messages SET content='{$content}' WHERE to='{$uname}' "); header('location: p1.php'); } ?>
  3. Alright, I will do that. Thanks for all your help!
  4. I am working on a website, where you can have accounts and status'. I want to create a "recent status updates" area but I need a little help. Is there a way to like, check recent updates to a mysql database? like check how recently under the table member the area "status" has been updated? if anyone could point in the right direction for this, it would be quite helpful. And if you maybe need more info to help me, let me know. Thanks!
  5. Thanks, that was precisely what I needed. Sorry I left out a lot of information, but the strcasecom() worked perfectly for what I needed, thanks!
  6. Ooh, also, I made it with PHP and MySQL if that helps
  7. Okay so I have a completely fully functional member system. Login works, register works, In this system I dont let people make two accounts with the same name, however if they have caps in different spots, it works. Any ideas how to prevent this? Any help is much appreciated! Thanks!
  8. I will paste the code below. Okay so I've benn trying to work with SQL in php connecting to a MySQL Database I have hosted on my own computer. I am trying to use an HTML form to get in info I need. But when I hit SUBMIT I don't get the output I was looking for. Any ideas why my code wont work? Also, I am sorry if this is the wrong section, I am new to the forum, if this is the wrong section, can someone please point me to where i need to go? Thanks! <html> <form action="index.php" method="post"> <input type="text" name="username"><br> <input type="text" name="password"><br> <input type="submit"> </form> </html> <?php $uname = $_POST[username]; $pword = $_POST[password]; $con=mysqli_connect('localhost', 'root2', '', 'first_db'); //Check conbnection if(mysqli_connect_errno()) { echo 'Failed to connect: ' . mysqli_connect_error(); } else{ $result = mysqli_query($con,"SELECT * FROM members WHERE username=$uname"); while($row = mysqli_fetch_array($result)) { echo $row['username']; echo $row['password']; echo $row['id']; } }
×
×
  • 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.