Jump to content

vijay

Members
  • Posts

    323
  • Joined

  • Last visited

Posts posted by vijay

  1. Hi...No that would not be work even if with tthe persistan link also with mysql_pconnect();If you found the other way then tell me...you can do the following (probably that u know..):

    <?phpsession_start();$link=mysql_connect("localhost","root","");$sel_db=mysql_select_db("db_name");$qry="SELECT * FROM table WHERE language = 'english' ORDER BY id DESC LIMIT 12";$result=mysql_query($qry,$link);echo 'This is all of our members<br /><br />';while($row = mysql_fetch_array($result)){	echo $row['username'];	echo '<br />';}?>

    Regards,Vijay

  2. Hi..u can do that by following..ob_start();include('s.php');ob_clean();tell this file as t.php..but with this you can not apply css in ur pagebut may I know why u r doing silly thing.. am not getting..Regards,Vijay

  3. Hi..see the following code..you will get the things what to do..you have to do same over there..

    function func1($param){	return func2($param*10);}function func2($param){	return $param*30;}$param=10;$ret_val=func1($param);echo "return Value: ".$ret_val."</br>";

    Regards,Vijay

  4. Hi.. May I have full table structure of those both tables.. I have also try like this: category: cat_a,cat directory: bname,btel SELECT c.cat, concat(d.bname,' ',d.btel) FROM `cat` AS `c` inner join directory as `d` on c.id = d.cat_id order by cat asc Suppose this will help u..Regards,Vijay

  5. Hi.. Is there any chat script or demo based on only AJAX and JAVASCRIPT..? IN php... No use of database.. have got and made but not too good enough and simultaneous.. Thanks in advance..Regards,Vijay

  6. Hi,try to ammend this line echo "<meta http-equiv=\"Refresh\" content=\"0\" URL=\"profile.php\"/><center>redirect</center>";othewise check the is it redirecting on 'profile.php'if yes then check the content of 'profile.php'or its still remain in 'login.php'try to debug the code line by line and check where ur control goes.. suppose this will help you..Regards,Vijay

  7. Hi.. I dont know whether there i any other way except refresh the page.. with the help of AJAX you can do this at regular interval you have to call that file which will give us "last modified time" of that file.. Regards, Vijay

  8. Hi use the following qry:Table: cat - id, cat Table: product - id,cat_id,product_nameSELECT * FROM `cat` WHERE id NOT IN ( SELECT DISTINCT ( cat_id ) FROM product )Regards,Vijay

  9. Hi..Use the following code... and modify according ur req..

    <?phprequire_once("functions.php");//_pr(gd_info());//$size = getimagesize("./image/Blue hills.jpg");//_pr($size,1);$uid=uniqid();$random_str=substr($uid,-6);header("Content-type: image/png");$im = @imagecreate(50, 30)    or die("Cannot Initialize new GD image stream");$w   = imagecolorallocate($im, 255, 255, 255);$red = imagecolorallocate($im, 255, 0, 0);$background_color = imagecolorallocate($im, 255, 255, 255);$text_color = imagecolorallocate($im, 233, 14, 91);$black = imagecolorallocate($im, 0, 0, 0);// prints a black "P" in the top left corner//imagechar($im, 1, 0, 0, $random_str, $text_color);imagestring($im, 5, 5, 5, $random_str, $text_color);imagepng($im);imagedestroy($im);?>

    Regards,Vijay

  10. Hi..try with this: suppose this will help u.. with help of php and js

    <?php/* Created: 12/21/2006daysinfuture2.php -> original code by TDavid @ tdscripts.com License: Creative Commons 2.5 AttributionDesscription: Enter in days in the future and find out the date*/$timezonelist = array('Africa/Abidjan','Africa/Accra','Africa/Addis_Ababa','Africa/Algiers','Africa/Asmera','Africa/Bamako','Africa/Bangui','Africa/Banjul','Africa/Bissau','Africa/Blantyre','Africa/Brazzaville','Africa/Bujumbura','Africa/Cairo','Africa/Casablanca','Africa/Ceuta','Africa/Conakry','Africa/Dakar','Africa/Dar_es_Salaam','Africa/Djibouti','Africa/Douala','Africa/El_Aaiun','Africa/Freetown','Africa/Gaborone','Africa/Hara','Africa/Johannesburg','Africa/Kampala','Africa/Khartoum','Africa/Kigali','Africa/Kinshasa','Africa/Lagos','Africa/Libreville','Africa/Lome','Africa/Luanda','Africa/Lubumbashi','Africa/Lusaka','Africa/Malabo','Africa/Maputo','Africa/Maseru','Africa/Mbabane','Africa/Mogadishu','Africa/Monrovia','Africa/Nairobi','Africa/Ndjamena','Africa/Niamey','Africa/Nouakchott','Africa/Ouagadougou','Africa/Porto-Novo','Africa/Sao_Tome','Africa/Timbuktu','Africa/Tripoli','Africa/Tunis','Africa/Windhoek','America/Adak','America/Anchorage','America/Anguilla','America/Antigua','America/Araguaina','America/Aruba','America/Asuncion','America/Barbados','America/Belem','America/Belize','America/Bogota','America/Boise','America/Buenos_Aires','America/Cancun','America/Caracas','America/Catamarca','America/Cayenne','America/Cayman','America/Chicago','America/Chihuahua','America/Cordoba','America/Costa_Rica','America/Cuiaba','America/Curacao','America/Dawson','America/Dawson_Creek','America/Denver','America/Detroit','America/Dominica','America/Edmonton','America/El_Salvador','America/Ensenada','America/Fortaleza','America/Glace_Bay','America/Godthab','America/Goose_Bay','America/Grand_Turk','America/Grenada','America/Guadeloupe','America/Guatemala','America/Guayaquil','America/Guyana','America/Halifax','America/Havana','America/Indiana/Knox','America/Indiana/Marengo','America/Indiana/Vevay','America/Indianapolis','America/Inuvik','America/Iqaluit','America/Jamaica','America/Jujuy','America/Juneau','America/La_Paz','America/Lima','America/Los_Angeles','America/Louisville','America/Maceio','America/Managua','America/Manaus','America/Martinique','America/Mazatlan','America/Mendoza','America/Menominee','America/Mexico_City','America/Miquelon','America/Montevideo','America/Montreal','America/Montserrat','America/Nassau','America/New_York','America/Nipigon','America/Nome','America/Noronha','America/Panama','America/Pangnirtung','America/Paramaribo','America/Phoenix','America/Port-au-Prince','America/Port_of_Spain','America/Porto_Acre','America/Porto_Velho','America/Puerto_Rico','America/Rainy_River','America/Rankin_Inlet','America/Regina','America/Rosario','America/Santiago','America/Santo_Domingo','America/Sao_Paulo','America/Scoresbysund','America/Shiprock','America/St_Johns','America/St_Kitts','America/St_Lucia','America/St_Thomas','America/St_Vincent','America/Swift_Current','America/Tegucigalpa','America/Thule','America/Thunder_Bay','America/Tijuana','America/Tortola','America/Vancouver','America/Whitehorse','America/Winnipeg','America/Yakutat','America/Yellowknife','Antarctica/Casey','Antarctica/Davis','Antarctica/DumontDUrville','Antarctica/Mawson','Antarctica/McMurdo','Antarctica/Palmer','Antarctica/South_Pole','Arctic/Longyearbyen','Asia/Aden','Asia/Almaty','Asia/Amman','Asia/Anadyr','Asia/Aqtau','Asia/Aqtobe','Asia/Ashkhabad','Asia/Baghdad','Asia/Bahrain','Asia/Baku','Asia/Bangkok','Asia/Beirut','Asia/Bishkek','Asia/Brunei','Asia/Calcutta','Asia/Chungking','Asia/Colombo','Asia/Dacca','Asia/Damascus','Asia/Dubai','Asia/Dushanbe','Asia/Gaza','Asia/Harbin','Asia/Hong_Kong','Asia/Irkutsk','Asia/Jakarta','Asia/Jayapura','Asia/Jerusalem','Asia/Kabul','Asia/Kamchatka','Asia/Karachi','Asia/Kashgar','Asia/Katmandu','Asia/Krasnoyarsk','Asia/Kuala_Lumpur','Asia/Kuching','Asia/Kuwait','Asia/Macao','Asia/Magadan','Asia/Manila','Asia/Muscat','Asia/Nicosia','Asia/Novosibirsk','Asia/Omsk','Asia/Phnom_Penh','Asia/Pyongyang','Asia/Qatar','Asia/Rangoon','Asia/Riyadh','Asia/Saigon','Asia/Samarkand','Asia/Seoul','Asia/Shanghai','Asia/Singapore','Asia/Taipei','Asia/Tashkent','Asia/Tbilisi','Asia/Tehran','Asia/Thimbu','Asia/Tokyo','Asia/Ujung_Pandang','Asia/Ulan_Bator','Asia/Urumqi','Asia/Vientiane','Asia/Vladivostok','Asia/Yakutsk','Asia/Yekaterinburg','Asia/Yerevan','Atlantic/Azores','Atlantic/Bermuda','Atlantic/Canary','Atlantic/Cape_Verde','Atlantic/Faeroe','Atlantic/Jan_Mayen','Atlantic/Madeira','Atlantic/Reykjavik','Atlantic/South_Georgia','Atlantic/St_Helena','Atlantic/Stanley','Australia/Adelaide','Australia/Brisbane','Australia/Broken_Hill','Australia/Darwin','Australia/Hobart','Australia/Lindeman','Australia/Lord_Howe','Australia/Melbourne','Australia/Perth','Australia/Sydney','Europe/Amsterdam','Europe/Andorra','Europe/Athens','Europe/Belfast','Europe/Belgrade','Europe/Berlin','Europe/Bratislava','Europe/Brussels','Europe/Bucharest','Europe/Budapest','Europe/Chisinau','Europe/Copenhagen','Europe/Dublin','Europe/Gibraltar','Europe/Helsinki','Europe/Istanbul','Europe/Kaliningrad','Europe/Kiev','Europe/Lisbon','Europe/Ljubljana','Europe/London','Europe/Luxembourg','Europe/Madrid','Europe/Malta','Europe/Minsk','Europe/Monaco','Europe/Moscow','Europe/Oslo','Europe/Paris','Europe/Prague','Europe/Riga','Europe/Rome','Europe/Samara','Europe/San_Marino','Europe/Sarajevo','Europe/Simferopol','Europe/Skopje','Europe/Sofia','Europe/Stockholm','Europe/Tallinn','Europe/Tirane','Europe/Vaduz','Europe/Vatican','Europe/Vienna','Europe/Vilnius','Europe/Warsaw','Europe/Zagreb','Europe/Zurich','Indian/Antananarivo','Indian/Chagos','Indian/Christmas','Indian/Cocos','Indian/Comoro','Indian/Kerguelen','Indian/Mahe','Indian/Maldives','Indian/Mauritius','Indian/Mayotte','Indian/Reunion','Pacific/Apia','Pacific/Auckland','Pacific/Chatham','Pacific/Easter','Pacific/Efate','Pacific/Enderbury','Pacific/Fakaofo','Pacific/Fiji','Pacific/Funafuti','Pacific/Galapagos','Pacific/Gambier','Pacific/Guadalcanal','Pacific/Guam','Pacific/Honolulu','Pacific/Johnston','Pacific/Kiritimati','Pacific/Kosrae','Pacific/Kwajalein','Pacific/Majuro','Pacific/Marquesas','Pacific/Midway','Pacific/Nauru','Pacific/Niue','Pacific/Norfolk','Pacific/Noumea','Pacific/Pago_Pago','Pacific/Palau','Pacific/Pitcairn','Pacific/Ponape','Pacific/Port_Moresby','Pacific/Rarotonga','Pacific/Saipan','Pacific/Tahiti','Pacific/Tarawa','Pacific/Tongatapu','Pacific/Truk','Pacific/Wake','Pacific/Wallis','Pacific/Yap');$sizetz = count($timezonelist);$fdays = (int)$_POST['d'];$ftz = (int)$_POST['tz'];// 10,000 days maxif($fdays <0 || $fdays >10000) {$fdays = 7; // week from now is default}if($ftz > $sizetz || $ftz < 0) {$ftz = 107; // default timezone PST}// Time Zone set EXAMPLE // putenv("TZ=America/Los_Angeles");putenv("TZ=$timezonelist[$ftz]");$today = time();$future_tense = strtotime("+$fdays days", $today);print "Now: " . date("l M d, Y H:i:s", $today) . " <i>$timezonelist[$ftz]</i><br /><font color=\"green\"><b>+ $fdays days =</b></font> <b>" . date("l M d, Y H:i:s", $future_tense) . '</b>';?><form method="POST" action="">Number of days in the future? <input type="text" size="3" name="d" value="<?php echo($fdays);?>"> Timezone? (pending) <select name="tz"><option SELECTED value="107">USA - Pacific (GMT -8)</option><option value="70">USA - Midwest (GMT -6)</option><option value="122">USA - Eastern (GMT -5)</option><?phpfor($y=0;$y<$sizetz;$y++) {    print("<option value=\"$y\">$timezonelist[$y]</option>\n");}?></select> <input type="submit" value="See future date"></form>

    Regards,Vijay

  11. Hi..please check first @ when ur function getting over..? (end brace)and am not also getting how it will take the val of day, month and year...so for that you have to take that value first..suppose this will hint you..Regards,Vijay

  12. Hi Simply use the following code for new line..

     <?php 	if(isset($_POST['Submit'])) 		echo nl2br($_POST['myarea']);?> <form name="form1" id="form1" method="post" action="" enctype="multipart/form-data"> <textarea name="myarea" cols="30" rows="3" ></textarea>  <input type="submit" name="Submit" value="Submit" /></form>

    suppose this will help you..Regards,Vijay

  13. Hi..do one thing...<?php$_SESSION = array();unset($_SESSION);session_destroy();header(location:"login.php");exit;?>write exit..Regards,Vijay

  14. Hi on logoput page just try the following code$_SESSION = array();unset($_SESSION);session_destroy();header(location:"login.php");Regards,Vijay

  15. Hi... I have form with file button in webpage. I want to do validate it. my validation criteria.. user can only browse the button and add file. user has no access to wright in text box besides browse button.. actually I have done <input type="file" name="filename" id="filename" onkeyup="this.value='';" > But this is working only for Firefox not in IE.. Thanks in advance..Regards,Vijay

  16. Hi..use the following code..

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><script type="text/javascript" language="javascript">function hideall(){	document.getElementById('menu1').style.display='none';	document.getElementById('menu2').style.display='none';	document.getElementById('menu3').style.display='none';}function showme(id){	hideall();	document.getElementById(id).style.display='';}</script></head><body><table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">  <tr>    <td width="33%"><a href="#" onmouseover="showme('menu1');">menu1</a></td>    <td width="33%"><a href="#" onmouseover="showme('menu2');">menu2</a></td>    <td width="33%"><a href="#" onmouseover="showme('menu3');">menu3</a></td>  </tr>  <tr>    <td><div id="menu1" style="display:none"><table width="100%" border="0" cellspacing="0" cellpadding="0">  <tr>    <td>menu1-Item1</td>  </tr>	  <tr>    <td>menu1-Item2</td>  </tr>	  <tr>    <td>menu1-Item3</td>  </tr>	      </tr></table></div></td>    <td><div id="menu2" style="display:none"><table width="100%" border="0" cellspacing="0" cellpadding="0">  <tr>    <td>menu2-Item1</td>  </tr>	  <tr>    <td>menu2-Item2</td>  </tr>	  <tr>    <td>menu2-Item3</td>  </tr>	</table></div></td>    <td><div id="menu3" style="display:none"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr>    <td>menu3-Item1</td>  </tr>	  <tr>    <td>menu3-Item2</td>  </tr>	  <tr>    <td>menu3-Item3</td>  </tr>	</table></div></td>  </tr></table></body></html>

×
×
  • Create New...