Jump to content

ReKoNiZe

Members
  • Posts

    49
  • Joined

  • Last visited

    Never

Everything posted by ReKoNiZe

  1. SELECT COUNT(*) As TotalNumber FROM new_members WHERE mode="visa" That will list a TotalNumber of the times visa was used.
  2. Please use code tags, your code makes my eyes bleed $fileName = $_FILES['imagefile']['name']; $tmpName = $_FILES['imagefile']['tmp_name']; $fileSize = $_FILES['imagefile']['size']; $imtype = $_FILES['imagefile']['type']; @list(, , $imtype, ) = getimagesize($_FILES['imagefile']['tmp_name']); // Get image type. if ($imtype == 3) // cheking image type $imageextension="png"; // to use it later in HTTP headers elseif ($imtype == 2) $imageextension="jpeg"; elseif ($imtype == 1) $imageextension="gif"; else $msg = 'Error: unknown file format'; $fp = fopen($tmpName, 'r+'); $content = fread($fp, filesize($tmpName)); //reads $fp, to end of file length $instr = fopen("latest.img","rb"); $image = addslashes(fread($instr,filesize("latest.img")));
  3. Or maybe he wants like: if(strlen($variable) > 12) echo 'String is too long, try again'; else echo 'Your string is short enough, you may enter';
  4. Why not juse use the empty function? empty returns true and false.
  5. In the main commentrows while loop, you could try do a query for that users_id. So you could do: $userQuery = mysql_query("SELECT * FROM users WHERE id = '$sessionname'"); $userresult = mysql_fetch_array($userQuery); if there is a different user for each comment, you will need to change that $sessionname to $commentrows['id'] or whatever you use that has the ID of the commented user. Then you could just do $userresult['username']; and so forth.
  6. Have it echo the session username to you to see what the current username is then.
  7. Must be an issue with the session then if none of them work.
  8. Did you try any of them by themselves? Example: if(isset($_SESSION['username'] == "Admin")) And try each one individually to see if its working at all.
  9. You need to fix $memberQuery = SELECT member_id FROM member_id WHERE email='$email'. That was just an example, its fairly close to what you need, look at the INSERT INTO query code right above it and follow that standard.
  10. Line 48, you need another bracket. echo $id . "<a href='view.php?id=$id'>$name</a>" . $age . $color . $breed . $gender . "<br> />"; } needs to be: echo $id . "<a href='view.php?id=$id'>$name</a>" . $age . $color . $breed . $gender . "<br> />"; } } You were missing a closing bracket from your else statement.
  11. That doesn't make. It should work, I'm not 100% why its not working. Your function must be adding some character we can't see.
  12. On this line: if($object->has_attribute($attribute)) { What does has_attribute function do or look like? It looks like you're making an empty object and seeing if it has any attributes, which it won't, hence it returns false.
  13. Do the query I stated above and select the auto-incremented key(whatever that field is called) and do: $memberQuery = SELECT FROM etc(query earlier) $memberResults = mysql_fetch_assoc($memberQuery); Then you can just do a $memberResults['member_id'];(Or whatever your auto-incremented key is called) to output the member id
  14. Hmm.. Show us more code if you can then, sounds like it should work fine.
  15. The function in the if statement is a little odd... Try changing echo "Image upload success!"; } to: echo "Image upload success!"; } Do that with the else statement too, putting curly brackets on their own line is good practice and makes things easier to read and find the beginning/end of an if statement.
  16. Try changing it to WHERE titulo='$search' to see if that changes anything
  17. Grab from $id down to $gender and use this instead: echo $id . "<a href='view.php?id=$id'>$name</a>" . $age . $color . $breed . $gender . "<br> />";
  18. What are you using the userrow for? I see that it provides an image and name to the comments but that information seems like it should be in your other table with the comments.
  19. Your query looks fine, try making it echo your query so you can see if you have any weird spacing or anything.
  20. You could add it right after this: // now we insert it into the database $insert = "INSERT INTO member_id (forename, surname, email) VALUES ('$_POST[forename]','$_POST[surname]','$_POST[email]')"; $add_member = mysql_query($insert); That is where the query is actually made and the information is in the database, so right after that bit of code should work.
  21. Looks like you have a floating } at the end there, need to show us more code so we can see where the issue is.
  22. Go ahead and take the breaks out then and for each variable just do echo $variable1 . $variable2 . $variable3 and so forth. I see no issue on line 70. I would make sure you dont have an extra line at the end of your code.
  23. Your function looks fine, could you show us the code that does the query?
  24. You will need to query what you just inserted. So you could do: SELECT member_id FROM member_id WHERE email='$email' Then just do a mysql_fetch_array() on the query and spit out the member_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.