Jump to content

MarkT

Members
  • Posts

    168
  • Joined

  • Last visited

Everything posted by MarkT

  1. I assume you want to save it to a text document on the server,If so I recommend using PHP fwrite, tutorials below;http://www.w3schools.com/php/func_filesystem_fwrite.asphttp://php.net/manual/en/function.fwrite.php
  2. MarkT

    [PHP] Problem

    My $_SESSION['id'] returns null.These are where it sets the Session variable; $id = mysql_query("SELECT * FROM `users` WHERE `name` = '{$name}' AND `email` = '{$email}'");$ida = mysql_fetch_assoc($id); $_SESSION['id'] = $ida['id2'];
  3. MarkT

    PHP Select Not Working

    No records returned.Resource id #26is what it says, when I print the query ($pass)
  4. MarkT

    PHP Select Not Working

    I've tried that, But i know there's a record, but it's still showing "No Records Returned"
  5. MarkT

    PHP Select Not Working

    Dont get it, Can you write the code I should have?
  6. Hello,I currently have the following code;$user=$_GET['user']; $pass=mysql_query("SELECT password FROM users WHERE username='$user'"); $pass2=mysql_fetch_assoc($pass); echo "Password:" . $pass ; but it's only saying; Password:Resource id #26
  7. MarkT

    [PHP] Problem

    What should I do now then?
  8. MarkT

    Text over images

    I think you should use the CSS absolute positioning feature;tutorial here;http://www.w3schools.com/css/css_positioning.asp I suggest you put it inside a div where the image is and position it appropriately. You might be able to use display: overflow;
  9. I just create a class, for example; #{DIV ID} .selected {background-color: #FF0000;} then in the HTML,<div id="{DIV ID}" class="selected"></div>
  10. I'm not 100% sure, but it's only padding problems? I don't really see what the problem is, as I don't have a clue why it's doing what it is. It's extraordinary because I've never seen it in my 3 years of coding. Try uploading it to a free web host? And see if the styling changes again
  11. Hello,I recently saw a lot of malicious spam flooding on the forums, was this a malicious attack? i'm just wondering why they did it, and how they got round the spam prevention features?
  12. MarkT

    [PHP] Problem

    array(4) { ["id"]=> NULL Tried that and thats what I got ^^I think it's not saving the ID of the session in the below code;$id = mysql_query("SELECT * FROM `users` WHERE `name` = '{$name}' AND `email` = '{$email}'");$ida = mysql_fetch_assoc($id);$_SESSION['id'] = $ida['id2'];
  13. MarkT

    [PHP] Problem

    If you think of anything I could do! Let me know!!!!!
  14. MarkT

    [PHP] Problem

    Any more suggestions?
  15. create an image, and do <?PHP$captcha = $_POST['captcha']; if($captcha == {what image says}){ die('Invalid Captcha'); } etc. I'm sure you know how to finish the rest
  16. Try this;padding-left: 10px; then post what happens
  17. You want to make the header appear lower down the page?Do a margin-top: 10px;in the main header div that encloses everything in the header
  18. MarkT

    [PHP] Problem

    I have done this, and it shows the correct record in the database, but won't show it on the page.
  19. MarkT

    [PHP] Problem

    $id= $_SESSION['id'];$id2 = mysql_query("SELECT * from friends WHERE id1 = '{$id}'");$eid = mysql_fetch_assoc($id2);if (!$id2) { die('Invalid query: ' . mysql_error());}echo "ID: " . $eid['id2'] ; is my current code;It's not displaying any errors, but it's also not displaying "2" because |I have a record where ID 1 = 1 (My session['id']) and ID2 = 2
  20. MarkT

    [PHP] Problem

    how do i do that>?
  21. MarkT

    [PHP] Problem

    $id= $_SESSION['id'];$id2 = mysql_query("SELECT * from Friends WHERE id1 = '$id'"); Is my query, but i dont see any problems with it?
  22. MarkT

    [PHP] Problem

    On another page i have this code;$id= $_SESSION['id'];$id2 = mysql_query("SELECT * from Friends WHERE id1 = '{$id}'");$eid = mysql_fetch_assoc($id2);echo "ID: " . $eid['id2'] ;?> But the echo isn't echo'ing what it should be, at the moment there is a entry where id1=1, which is the ID i'm logged in as which should be set in $_SESSION['id']and ID2 = 2, so it should echo 2, however it's not. It's saying;Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/u872116037/public_html/home.html on line 66 ID:
  23. MarkT

    [PHP] Problem

    I have edited it to this, is it right? $id = mysql_query("SELECT * FROM `users` WHERE `name` = '{$name}' AND `email` = '{$email}'"); $ida = mysql_fetch_assoc({$id})$_SESSION['id'] = $ida['id2'];
  24. MarkT

    [PHP] Problem

    Can you please edit my code to show me?
  25. MarkT

    [PHP] Problem

    I now have;$id = mysql_query("SELECT * FROM `users` WHERE `name` = '{$name}' AND `email` = '{$email}'");$_SESSION['id'] = . $id["id"];on the login page ^^^ On the page where i want to use the ID:$id= $_SESSION['id'];$id2 = mysql_query("SELECT * from Friends WHERE id1 = '{$id}'");$eid = mysql_fetch_assoc("{$id2['id2']}");echo "ID: " . $_SESSION['id'] ; But it's not picking up $_SESSION['id']
×
×
  • Create New...