Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. oh.oops. I overlooked that.. Well, in my opinion, your best bet is to go with Mchl's suggestion. Send every user a link (by email) to a "login page". Then use an encryption of what they type for their password as the new password. It'd be a little less complicated that digging out the crypt function in 5.2 and merging it with your 5.3 installation.
  2. Well, if all you have to do is put a dollar sign in at the end of the salt to make it work with 5.3, then why not do that? Or is that what you were explaining? Is this solved. is more what I'm asking.
  3. Are you sure your not just prepending "Select a profile" onto the variable somewhere. From the code you've shown us,.. I see nothing wrong with it. Nothing near what you're explaining
  4. Is your question about the Debug class (that you generously posted) or is it about an include problem, because reading and re-reading your situation isn't doing anything for me except confuse me. Just from my understandings... you are trying to include a file with a class in it.. and then include that file (including the class) into another file... and use the class.. Or are you trying to pass an object around?
  5. I'm not too clear on what you're asking, but you could try using the val() function instead of text(). ........lected').text() to ....... ........lected').val() to .......
  6. Just run another query directly afterwards.. SELECTing the most recent addition. /*bllahal blah blha blah UPDATE query.. with PHP *//////// $lastID = mysql_result( mysql_query("SELECT id FROM table ORDER BY id DESC LIMIT 1"), 0 ); echo "The last updated id is " . $lastID;
  7. I'd probably have them sign something (in a some more creative/professional words) saying that they were at the very most, completely satisfied with what you had made for them. Including that particular day at a particular time. Precise..signing I guess. Any make sure that it's mentioned somewhere that anything beyond the point of signing this paper will be such as such dollars per hour.. or whatever the time to value ratio is.... then having them sign another one... and another one... and another one.
  8. Yes.. they're called ternary statements. example $lightbill = "ridiculous"; $amIbroke = ($lightbill == "paid") ? false: true; echo $amIbroke ? "Yes" : "No, but you soon will be anyway";
  9. white pages usually mean a database problem... just my experience check your query.. comment out the database query line..
  10. Why not just have three columns? Each with a percentage width... col 1 col2 col3 (10%) | (40%) | (50%)
  11. bad markup maybe? where's your code (use code tags)
  12. you gotta put the session var here... username ={$_SESSION['username']} in quotes; or else it thinks the value of the session var is a column.. or column alias username = '{$_SESSION['username']}'
  13. actually I take that back.. if you return the mysql_query function it'll just do the same thing. Since your starting a new resource each time you call the function. I guess you could get away with passing it as a reference or something though.... (anything but global) function listfriends($UserID){ $SELECT = mysql_query("SELECT ContactID FROM social WHERE UserID='$UserID' AND Type='Friend'") Or die(mysql_error()); while($row[] = mysql_fetch_assoc ($_SESSION['Current_User'])); return ($row); } $allFriends = listfriends($_SESSION['Current_User']); foreach($allfriends as $id=>$firend) { getusername($allfriends['ContactID']).'[Mail] [Remove] '; } ?>
  14. You'd probably be better off returning the mysql_query() output. If you return the mysql_fetch_ functions... you'll only get the first row.. a single-dimensional array... i.e: there's no reason to loop through it. function listfriends($UserID){ return mysql_query("SELECT ContactID FROM social WHERE UserID='$UserID' AND Type='Friend'") Or die(mysql_error()); } $row = mysql_fetch_assoc(listfriends($_SESSION['Current_User']))); echo getusername($row['ContactID']).'[Mail] [Remove] '; ?>
  15. Because PHP is server side.. not client side. Now if you were wanted to cache these screenshots on the server and THEN display them client side.. that would be a different story.
  16. Yes, I read the online certificate part. It's an online class.. I realize that. But the most vital information when it comes down to getting an actual screenshot is.. what format is the "document" (slash) "certificate?" Most likely you'll have to find a PHP Class (most likely that uses the GD library) that handles creating screenshots from PDFs or DOC files. But still, the only question I got out of your OP is.. "Is this possible?" It is, but it will take a bit of research.
  17. .. this is what you call a case of .. lack of information. What document? What certificate?... the SSL certificate? a birth certificate?
  18. Inside a Files array will be something like name - the name of the file tmp_name - the path & name of the uploaded file on the server size? - the size of the file in bytes .... there's more but.. the point is to access one of them you simply do this $_FILES['upload']['name'] /// $_FILES['upload']['tmp_name'] $_FILES['upload']['size']
  19. mysql_query("UPDATE users SET profile_pic= '$_FILES[upload]' WHERE user_id = '19'"); you've got to use single quotes for an associative key such as upload... i.e $_FILES['upload'] but the problem in using single quotes would be that you would get an error at [ in your SQL syntax because there's just too many single quotes for PHP to interpret. In order to fix that you can either: Surround the variable in curly braces mysql_query("UPDATE users SET profile_pic= '{$_FILES['upload']}' WHERE user_id = '19'"); Concatenate it in there mysql_query("UPDATE users SET profile_pic= '" . $_FILES['upload'] . "' WHERE user_id = '19'"); or put your data in a variable that works with the way you normally did $fileUpload = $_FILES[upload]; mysql_query("UPDATE users SET profile_pic= '$fileUpload' WHERE user_id = '19'"); But I can guarantee you'll still get an error because $_FILES['upload'] will be an array... with more information than what you're wanting. To see what's inside it use this code echo "", print_r($_FILES) , "";
  20. a multiple select will give you an array in your POST.. from which you will need to loop through each of them and INSERT a new row. Fortunately, the INSERT statement can be bundled with multiple INSERTs.. so you can just populate one variable with all your inserts and perform ONE query; inserting them all something like this foreach($_POST['station_id'] as $stationID => $value) { $insertStatement .= "INSERT into table (`song`, `station`) VALUES ('" . $_POST['song_id'] . "','$stationID');\n"; /*The semicolon inside is IMPORTANT.. the \n is just to put them on separate lines if you feel like looking at them */ } $insertThem = mysql_query($insertStatement);
  21. Glad you got it sorted. Remember nl2br() = New Line ->
  22. Obviously, there is something stripping your output of its newlines. Which is exactly what the nl2br function is for. It take new lines and turns them into 's. I know you can't assume the user knows HTML, you've already mentioned this. Repetition isn't the answer and The answer isn't repetition. If you can't get the newlines to show, then how do you expect the user to. I'm not expecting you or telling you how to run your website or even how to program it. But before you can even begin to program a site FOR someone you need to know WHY it isn't showing the newlines. Is there any other code you're not showing us that could possibly effect the output. Since obviously, the input seems to be PERFECT.
  23. well echo it out inside a P tag and see what happens. If the formatting is there within phpmyadmin .... or mysql as most call it, then it's not impossible to say YOU can do it too.
  24. are you even echoing this text within a pre-formatted element? For instance, the P tag. Or are you just echoing it flat out
×
×
  • 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.