Jump to content

Corona4456

Members
  • Posts

    244
  • Joined

  • Last visited

    Never

Everything posted by Corona4456

  1. How about PHP.NET? lol... The framework would quite possibly be useful, however, I think an important aspect of your framework would be good documentation.  A heavily documented framework will get more people interested in your product than anything else.  That's what draws me to using certain tools is their documentation which therefore provides an ease of use for the tool.
  2. So what's the problem.  You don't really state the exact nature of the problem you are having.  Are you getting an error on trying to insert your data?
  3. Isn't the syntax supposed to be: [code]document.myform.submit()[/code] ?
  4. how do you know it's mysql_num_rows()? Could you please give us your error and not your friend's? That doesn't help us any.  The error is misguiding since it's your friend who got the error not you.
  5. no problem :).  Glad to help. Let me know if you need help with anything else
  6. ah ok... I see... since you are using varchar(255) this is not possible.  Why don't you use integers instead? use the id field instead of the userid field.
  7. hmm... well I'm not sure I can explain it any further than that. However if you run that query.  It will solve your problems as to having the user add the same friend twice. if you try to insert a friend twice mysql will give you an error.
  8. in your friends table make `userid` and `friendid` a unique set: [code] ALTER TABLE `friends` ADD UNIQUE `friendid` ( `userid` , `friendid` ) [/code] running that code will make userid and friendid unique to each other. That way it's one too many both ways.  This will prevent the following in your table: userid    |    friendid --------------------- a          |              b a          |              b But you can do: userid    |    friendid --------------------- a          |              b b          |              a make sense?
  9. Try this reg exp: /((http|ftp|https):\/\/[^\s\"']+\b)\//i
  10. Ok... well I misread your code the first time so all my references to "friend_id" field is wrong.  Anyway... first off ... you can still implement the unique field, however, I don't know the format of your users table nor users table so i can't give you a good example. if you post the format I can easily give you an example though :).
  11. you can do one of two things: [list] [*]You can go into mysql and make the friend_id field a unique field... it's easy to do in phpMyAdmin if you have access to it that way I recommend to do it that way. [*]You can do a query first on your friend_id field for the current user.  If mysql_num_rows(<query_result>) is > 0 then you can assume the friend has already been added [/list]
  12. If you feel like looking at some code ... look at phpWebAlbum (google it) and check it out.  It uses gd to manipulate images.
  13. [code]<?php //to obtain user id session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/code] You need it at the very top.
  14. make sure that session_start() is at the very beginning of your script, before any html code is sent to the browser.
  15. replace '$Submit' in your script with '$_POST['Submit']'
  16. So does the maximum # of reservations include the number of days the passes are for? i.e. a 3 day pass = 3 total reservations?
  17. I use it for new content on my website and it seems to do the job pretty well.  It takes a little getting used to but I think it's a pretty advanced editor as opposed to others. I would just try it out locally first and see if you like it... if it does then put it in your employer's website :).
  18. Unfortunately the system() command only returns the status result of the command argument.  Therefore if it executes properly a 0 will be returned.  That's why your var is set to 0.  The only way to get the output of a command is to use the pipe command and have the output redirected to a file handler... like so: [code] open (HTML_FILE, "php myscript.php a b |");[/code]
  19. Don't worry about it :).  I do dumb things like that all the time :) ... just glad to help
  20. [code]  $html = preg_replace("/((http|ftp|https):\/\/[^\s\"']+\b)\//i", "<a href=\"\\1\">\\1</a>", $html);[/code] Seems to work although there may be some problems with it in certain situations... you may have to capture what's in front of it to make sure that it's not part of an '<a href' tag
  21. http://www.phpfreaks.com/tutorials/40/5.php There's a checkuser.php there
×
×
  • 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.