Jump to content

magic2goodil

Members
  • Posts

    322
  • Joined

  • Last visited

    Never

About magic2goodil

  • Birthday 08/20/1984

Contact Methods

  • AIM
    RoughRooster
  • Website URL
    http://www.joshrobison.com

Profile Information

  • Gender
    Male
  • Location
    Virginia

magic2goodil's Achievements

Member

Member (2/5)

0

Reputation

  1. Post your lib.php and player class file so I can examine further.
  2. You might try: $provider=array(); $people=array(); $sql = "SELECT provider.cid, people.* FROM provider JOIN people ON provider.cid = people.cid WHERE provider.pid = {$id};"; $result=@mysql_query($sql,$con) or die(death($sql)); while($row = @mysql_fetch_assoc($result)) { $provider[] = "<option value=\"{$row['cid']}\">{$row['cid']}</option>"; $people[] = "<option>{$row['first_name']} {$row['last_name']}</option>"; } //Now you can reuse provider and people as you wish. foreach($provider as $value) { echo $value; } foreach($people as $value) { echo $value; }
  3. I think you need to be less vague.
  4. Here would be my basic singleton factory pattern: class Factory { protected static $_instance; private function __construct() {} public static function getInstance() { if(self::$_instance === false) { self::$_instance = new self(); } return self::$_instance; } public static function create($object, $id=null) { return new $object($id); } }
  5. magic2goodil

    eregi

    You might try something on the actual form page in javascript instead. Something like: <html> <head> <script> var spaces = 0; var theID; function watchKeys(e,id) { theID = id; if(window.event) { // IE key = e.keyCode; } else if(e.which) { // Netscape/Firefox/Opera key = e.which; } if(key == 32) { //spacebar if(spaces == 1) { val = document.getElementById(theID).value; document.getElementById(theID).value = val.substring(0, val.length-1); } else { spaces++; } } } </script> </head> <body> <input type="text" id="myText" name="myText" onkeypress="return watchKeys(event,this.id);"> </body> </html> I tested this a bit after I made it, it's buggy, but it's a start for you if you want to go that route.
  6. Hey guys, I created a script last night that uses Javascript and AJAX to watch for a certain key sequence and then it prompts for a password. The objective behind this idea was to make a hidden feature on a page that will appear when you hit the correct key sequence. The Ajax is used to conceal the sequence to an extent. I was curious, is anyone in the market for such a thing, or does anyone have any good ideas of what such a script could be used for? Sorry if this is in the wrong area.
  7. AndyB mentioned that Query was empty is an error. Do you have anything in your db that matches what you are referencing, or is it in fact returning nothing? I believe your die comes from an empty query being returned. If nothing matches in the db, try adding something to match it.
  8. Have you tried echoing out the $key and $value as they are being passed into $userinf to test and see that the valid data is being passed?
  9. Just wanted to say hey to everyone. It has been awhile since I have been around the forum, so i wanted to say what's up and see how everyone is doing. I don't know who all even knew me or even gives a crap, but anyways, just wanted to say hey. I've been working a new job, web developing for a pretty sweet company called Quincy Newspapers Incorporated. What have you guys been up to? Magic
  10. After all the posts i have given trying to help people, you'd think I might get a reply to my posts :-/
  11. Assuming you are referencing a single row via it's id: $query = "select max(*) from table where id = '$id'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_assoc($result) or die(mysql_error()); foreach($row as $key => $val) { echo "The highest value is: ".$key." with a value of ".$val; }
  12. Hey there. I am trying to use chmod in a script to chmod a directory dynamically. I keep getting permissions errors and I know why. I am getting them because when I upload the original folder it's not set to 0777. If I change it to 0777, chmod works, but by default it's not set to 0777. Here is my problem with that: I am making a self-installing application that needs to be able to be unzipped, uploaded by the user, and then have the install ran, and install automatically for them based upon their input for the db and such. My server has script chmoding shut off, so a friend recommended using ftp in the script, which works if u input your server ftp login and such and then public_html or www / the folder. The problem being that you have to manually enter that stuff. Is there a way to automatically detect whether it's www or public_html, etc..?? Also is there a better way of doing this. The basis of this is to install and then delete the install folder, then delete the script from config.php to do the deleting. Can anyone give me some input on this?
  13. I am trying to create a self installing php package that will use a mysql db for the background. I can very easily get it to work on my local computer, but when I tried it on my startlogic domain it had an error when trying to create the new database i specified. I know why it does this, because startlogic adds in, for my site, college_ before any db I create. My main question is, when I installed phpBB on there before, it was able to automatically install the new database, tables, etc. I know on some servers you can't just create a new database without some lame prefix in front of it, same as my online server does, and some others create a totally crazy name that wasn't event he one you put in originally. My main question is: I there some command to figure out what the prefix or altered name of the database is going to be? Can someone lead me towards a tutorial on this subject?
×
×
  • 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.