Jump to content

benhaynes

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

benhaynes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. SUPERB!!! Thank you SO much, thats exactly what I was looking for. I guess this is the problem with being self taught... you dont know all the easy stuff. Ben
  2. Ok, simple problem, I need to get all the GET variables and load them into an array... but the names are dynamic. Here is what Im using now...$ITEMS is an array of what the values COULD be...as loaded from a DB. [code]for($i=0; $i<count($ITEMS); $i++){ $NAME = $ITEMS[$i]; if($_GET[$NAME]){         $string .= $ITEMS[$i]."='".$_GET[$NAME]."',"; } }[/code] And here is the error I get when I use it... [code]Warning: Illegal offset type in XXXXXXXXXXXXX/add.php on line 15[/code] I think i understand the issue, but dont know a work around. Is there a way to just get all GET variables? Hope this makes sense... Thanks in advance!!! Ben
  3. Im trying to find a SQL query that will tell me if a field exists in a table. For example, I have a table called MEMBERS, and fields within that table called ID, NAME, PASSWORD... you get it... anyway, I need a SQL query that will tell me if the NAME field is in the table. I just need a boolean answer. Just to clarify, I DONT need to check if a value exists in a row... I need to know if the FIELD exists in the table. Any ideas? I was thinking something like this... but I dont know... [code]$query = "DESCRIBE MEMBERS";  $result = mysql_query($query); while($row = mysql_fetch_array($result)){ // LOOP THROUGH AND CHECK }[/code]
  4. Hey, I have a quick question... I have taught myself PHP and MySQL and am now pretty good, but having never taken courses... I am missing fundamental, easy stuff. For example, I am designing a CMS system with PHP/AJAX/MYSQL and keep getting an error about too many connections ... is this my fault? h ahaha h... I have my DB connection in a separate config.php file, and require_once it at the top of every page (including my AJAX pages that dont refresh the page). How often do I have to connect? And also,how often do I have to say "session_start();"? At the top of every page using SESSION variables? If it says it in my require_conce file do I still have to put it on the other pages? Sorry, I know this is a noob Q, but I have big holes in my knowledge.. Thanks in advance...
×
×
  • 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.