Jump to content

phpnewbei

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

About phpnewbei

  • Birthday 01/30/1994

Contact Methods

  • MSN
    Machram@live.se

Profile Information

  • Gender
    Male
  • Location
    Sweden

phpnewbei's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello everybody! I've been working with CSS/HTML for 2 years and would like your comment on this 'Design' I will add to my World of Warcraft forum that i am currently working on! Would also love some ideas for the website Image shown below! http://imageshack.us/f/716/generaldesignwow.jpg/
  2. Thanks for all the replies! Adam, I'll look at the jQuery-plugin you linked to and will try to work from that. Anyhow, I will try to get a grip about the MySQL part, I think it should work out just fine! //Machram
  3. Thanks for a fast reply! That was what I was looking for, but do you know if I can use MySQL commands in there also? Cuz it's pretty much needed I'm going to use it for a photo that you can choose to make as profile picture In the meantime, i'll try to fix it on my own! Thanks in advance! / Machram
  4. I need help with my webpage here, how do you get so if you are at http://www.blabla.com/account.php and then click on a photo, it will go to www.blabla.com/photo.php?id=1 but still be at account.php? Just like facebook shows their photos. I dont know how to think nor to get it work. Would appreciate some help! ThNXX 1n 4dv4nc3 // Machram!
  5. Not that good at explaining stuff, haha. Sorry mate, good luck tho!
  6. $votes = mysql_query("SELECT * FROM toplist WHERE serverowner='" . $_SESSION['user'] . "'") or die(mysql_error()); Think it should be like this, not sure though.
  7. As the title says I need help with multiple update system.. Can't really get it to work at all >.< Here's some code: $selectt = mysql_query("SELECT * FROM exercises WHERE user='" . $_SESSION["user"] . "' AND exname='" . $_GET["edit"] . "'"); echo '<form method="POST" action="exercises.php?edited">'; echo '<div id="newexx">'; while($raw = mysql_fetch_array($selectt)) { echo '<input type="text" name="up[' . $raw["id"] . ']" value="' . $raw["swe"] . '">'; echo '<input type="text" name="up1[' . $raw["id"] . ']" value="' . $raw["eng"] . '"><br>'; echo '<input type="hidden" name="id[' . $raw["id"] . ']">'; } echo '</div>'; echo '<input type="submit" value="Update Exercise">'; echo '</form>'; if(isset($_GET["edited"])) { $swe = $_POST["up"]; $eng = $_POST["up1"]; $id = $_POST["id"]; foreach($id as $value => $index) { $update = "UPDATE exercises SET swe='".$swe."', eng='".$eng."' WHERE id='".$index."'"; mysql_query($update); } Would be thankful for reply!
  8. <?php echo "<div id=\"homeform\">"; if(isset($_SESSION["username"])){ $link1 =' <a href="members.php?uname&changeinfo=' . $_SESSION["username"] . '"> Change information </a>'; $uname = isset($_GET['uname']) ? $_GET['uname'] : 'guest'; if($_SESSION["username"] == $uname){ echo "hej"; echo $link1; } elseif ($_SESSION["username"] == $_GET["changeinfo"]) { $sql = mysql_query("SELECT * FROM userinfo WHERE username='" . $_SESSION["username"] . "'"); while($row = mysql_fetch_array($sql)){ echo '<form method="POST" action="members.php?uname&changeinfo=' . $_SESSION["username"] . '">'; echo '<input type="text" name="name" value=' . $row["firstname"] . '>'; echo '<input type="submit" name="submit" value="Change">'; echo '</form>'; $firstname = $_POST["name"]; mysql_query("UPDATE userinfo SET firstname='$firstname' WHERE username='" . $_SESSION["username"] . "'"); } if($_POST["submit"]) { echo "Success!"; } } else { echo "du suger"; } echo "</div>"; } ?>
  9. Now, If I write something in my input fields and update, it works, but when I go back and change the information again, the field in my database gets emtpy :S My guess would be that when the database have been update, nothing happends, you'll return to the input field again.
  10. What's the differences between " and ' ? By the way, it doesn't update the table ;/
  11. Now I have an UPDATE error heh, here's my code: elseif ($_SESSION["username"] == (isset($_GET["changeinfo"]))) {$sql = mysql_query("SELECT * FROM userinfo WHERE username='" . $_SESSION["username"] . "'");while($row = mysql_fetch_array($sql)){echo "<form method=\"POST\" action=\"members.php?uname&changeinfo=" . $_SESSION["username"] . "\">";echo "<input type=\"text\" name=\"name\" value=\"" . $row["firstname"] . "\">";echo "<input type=\"submit\" value=\"Change\">";echo "</form>";$firstname = isset($_POST["name"]);mysql_query("UPDATE userinfo SET firstname='$firstname' WHERE username=" . $_SESSION["username"] . "");}}
  12. So I should place $uname = isset($_GET['uname']) ? $_GET['uname'] : 'guest'; in the beginning?
  13. Could you explain more how the code works and what it means?
  14. Ahh, thankyou It works properly now. I'll try to work on my own now, if it's something i'll write it here. Again, thankyou!
×
×
  • 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.