Jump to content

rajivgonsalves

Members
  • Posts

    2,166
  • Joined

  • Last visited

    Never

Everything posted by rajivgonsalves

  1. you can use the following code <? header("Content-type: text/plain"); header("Content-Disposition: attachment; filename=YOUR_FILE.csv"); $strContent = file_get_contents("http://..."); print $strContent ?>
  2. wrong syntax if(auth($user, $pass) = 1){ do this } should be if(auth($user, $pass) == 1){ do this }
  3. or use the mysql function STR_TO_DATE example STR_TO_DATE( '07/31/2007', '%m/%d/%Y' )
  4. if your talking about customizing the php error messages you can look at set_error_handler more information available at http://www.php.net/errorfunc
  5. Hey Dude, I wanna modify PHPBB forum for phpfreaks get your requirements into a doc... I'll do it anyone supporting me on the development.. will be appreaciate Regards, Rajiv Gonsalves
  6. You can use the case statment in the where cause for particular sets more information available at http://dev.mysql.com/doc/refman/5.0/en/case-statement.html
  7. You can see the following http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_date-sub or my favorites TO_DAYS function just abstract/add the date you want and use FROM_DAYS with combination with the date format your accpecting
  8. no problem zanus anyways the following should work fine Select User, Number, (Number+1) from Users;
  9. Actually I changed my post because it was wrong can you try could from my previous post
  10. Ok is there any way i can get you on chat (MSN/Yahoo/etc..)
  11. hope this will work for processing page $ $ID = 4; $cats = $_POST['co_workcat']; foreach($cats as $cat) { $cat_list1 .= $cat . ' '; } ; $query = mysql_query("SELECT ID FROM work_cat where cat_name = '$cat_list1'"); $result = $query; // put data into drop-down list box while ($row = mysql_fetch_array($result)) { echo ($row["ID"]); $cat_list1 = $row["ID"]; }; foreach ($cats as $strKey => $strValue) [ $sql = "INSERT INTO cat_relations SET relation_usr_id='$ID',relation_cat='$strValue'"; if (@mysql_query($sql)) { echo ("Good"); } else { echo("<p>Error adding cats: " . mysql_error() . "</p>"); } }
  12. ok try this last try $strCatId = $row['ID']; echo '<OPTION value="' . $strCatId . '">' . $i . '</OPTION>';
  13. sorry not reading too well lot of work i've done i = $row["cat_name"]; $strCatId = $row['relation_cat']; echo '<OPTION value="' . $strCatId . '">' . $i . '</OPTION>'; relation_cart or whatever your cat id is just get it there and it should work
  14. what is the column name for the id can you tell me
  15. tmallen you should have two base Constanst one for including file which would be something like $base_include = $_SERVER['DOCUMENT_ROOT']... and one for all your browser output (html, javascript, etc) $base_http = $_SERVER['HTTP_HOST']... hope it is helpful
  16. here is where your going wrong $i = $row["cat_name"]; echo '<OPTION value="' . $i . '">' . $i . '</OPTION>'; should be $i = $row["cat_name"]; $strCatId = $row["cat_id"]; echo '<OPTION value="' . $strCatId . '">' . $i . '</OPTION>';
  17. ob_start() should work fine as said by Nightslyr but if your wanna do something before that maybe you could use javascript redirects
  18. Basically in includes they are always path structure not URL (if you include a URL it would give you the output of the php source not the source itself) so if you can provide some code it would be helpful... you could use $_SERVER['DOCUMENT_ROOT'] for apache to define your root directory more information on the same can be found at http://in.php.net/function.include
  19. Well you can try out the CURL function in PHP... following is the link [url=http://in.php.net/curl]http://in.php.net/curl[/url]
  20. You could try the following code <? $strImage = file_get_contents("http://us.i1.yimg.com/us.yimg.com/i/ww/beta/y3.gif"); file_put_contents("test.gif",$strImage); ?> work well on php 5 on windows you can change the image name according to your need, hope it is helpful Cheer! Rajiv
  21. You can see more information on it on the following link http://www.php.net/manual/en/language.types.string.php#language.types.string.parsing.complex
  22. You could use Ajax and check the database every 1 minutes or so here a link which might help http://en.wikipedia.org/wiki/Ajax_(programming) or if you do not want to check if data has change you can refresh the page with a meta tag <meta http-equiv="refresh" content="60" /> 10 - number of seconds
×
×
  • 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.