rajivgonsalves
Members-
Posts
2,166 -
Joined
-
Last visited
Never
Everything posted by rajivgonsalves
-
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 ?>
-
wrong syntax if(auth($user, $pass) = 1){ do this } should be if(auth($user, $pass) == 1){ do this }
-
or use the mysql function STR_TO_DATE example STR_TO_DATE( '07/31/2007', '%m/%d/%Y' )
-
How to prevent the default error message from being displayed ?
rajivgonsalves replied to jd2007's topic in PHP Coding Help
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 -
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
-
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
-
[SOLVED] Sorting and summoning results from Database
rajivgonsalves replied to axm's topic in MySQL Help
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 -
no problem zanus anyways the following should work fine Select User, Number, (Number+1) from Users;
-
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
No problem dude!, anytime I'm here -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
Actually I changed my post because it was wrong can you try could from my previous post -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
Ok is there any way i can get you on chat (MSN/Yahoo/etc..) -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
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>"); } } -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
well give me ur msn id we'll get it solved -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
ok try this last try $strCatId = $row['ID']; echo '<OPTION value="' . $strCatId . '">' . $i . '</OPTION>'; -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
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 -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
what is the column name for the id can you tell me -
Include a scalar in my include argument?
rajivgonsalves replied to tmallen's topic in PHP Coding Help
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 -
[SOLVED] Problem with insert in correct format
rajivgonsalves replied to grumpy's topic in PHP Coding Help
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>'; -
[SOLVED] PHP session and header redirect problem... HMMmmm
rajivgonsalves replied to bri0987's topic in PHP Coding Help
ob_start() should work fine as said by Nightslyr but if your wanna do something before that maybe you could use javascript redirects -
Include a scalar in my include argument?
rajivgonsalves replied to tmallen's topic in PHP Coding Help
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 -
Pulling Variables from 3rd Party Return Page
rajivgonsalves replied to famous58's topic in PHP Coding Help
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] -
uploading images from other web locations..
rajivgonsalves replied to mkosmosports's topic in PHP Coding Help
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 -
[SOLVED] what does this mean : {$_SERVER['PHP_SELF']}?
rajivgonsalves replied to daboymac's topic in PHP Coding Help
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 -
[SOLVED] where did i go wrong? New to PHP
rajivgonsalves replied to ManOnScooter's topic in PHP Coding Help
Please use echo $row[0]; -
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