619 Posted Topics
Re: Your code didnt work for me.. Try this. [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>ToolTips Example</title> <style type="text/css"> .tooltip { border-bottom: 1px dotted #000000; color: #000000; outline: none; cursor: help; text-decoration: none; position: relative; } .tooltip span { … | |
Re: Other than API you can use phpmailer class and add addresses as bcc in email. | |
Re: phpmailer is best solution. You can give your excel fle path to AddAttachment function. Here is a link. [URL="http://phpmailer.worxware.com/index.php?pg=examplebsendmail"]http://phpmailer.worxware.com/index.php?pg=examplebsendmail[/URL] | |
Re: [URL="http://www.techrepublic.com/article/create-xml-with-mysql-and-php/5035149"]http://www.techrepublic.com/article/create-xml-with-mysql-and-php/5035149[/URL] | |
Re: I haven't tried but exec may help you. [CODE] exec('/etc/init.d/httpd graceful'); [/CODE] | |
Re: Try this recursive function. [CODE] <? function directoryToArray($directory, $recursive) { $array_items = array(); if ($handle = opendir($directory)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if (is_dir($directory. "/" . $file)) { if($recursive) { $array_items = array_merge($array_items, directoryToArray($directory. "/" . $file, $recursive)); … | |
Hi All, I have checked some available functions for error handling in php. But i didn't reach to goal. I want any php error to be shown on custom page. e.g. if there is comma missing and system throw [B]Parse error: syntax error, unexpected T_VARIABLE[/B] on the browser, can i … | |
Re: Yes.. Try to debug printed sql query in phpmyadmin. [CODE] echo $sql = "INSERTO INTO users (username) VALUES (?)"; exit; [/CODE] | |
Re: Try this code. [CODE] <?php $i = 0; while ($row=mysql_fetch_array($result)){ ?> <tr> <form name="form1" action="submitAction.php" method="post"> <td width="72" ><input type="text" autocomplete=off readonly="readonly" id="ProjectName_<?=$i?>" name="ProjectName<?php echo $row['No'];?>" value="<?php echo $row['ProjectName'];?>" size="20" style="font-size: 9"></font></td> <td width="72" ><input type="text" autocomplete=off readonly="readonly" id="DeviceType_<?=$i?>" name="DeviceType<?php echo $row['No'];?>" value="<?php echo $row['DeviceType'];?>" size="15" style="font-size: 9"></font></td> <td width="64" … | |
Re: Firstly you need to add strong captcha to your form. Then check this link for checking of email address. [URL="http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/smtpvalidateclassphp/"]http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/smtpvalidateclassphp/[/URL] ![]() | |
| |
Re: You want to show image on profile page or message page? You have written image code.What is the problem? [B]echo "<img src='$location' width='100' height='100'>";[/B] For src you have to give either relative path to image or absolute path. ![]() | |
Re: [CODE] // select from database and assign it in some variable if($key == $res['years']) // compare it with looping $key $checked = 'checked="checked"'; else $checked = ''; <input type="checkbox" name="years[]" <?php echo $checked; ?> id="years" value="<?php echo $key; ?>" > [/CODE] | |
Re: Error is not because of $Title, its because of $_POST['title']. Write if condition as shown below. [CODE] if(isset($_POST['title'])) $Title = $_POST['title']; [/CODE] Also you can use error_reporting function to rid of errors. | |
Re: This code works in windows. I have used exec function to run attrib command to check type of file. In linux os attrib won't work. [CODE] <?php function getDirectoryList ($directory) { // create an array to hold directory list $results = array(); // create a handler for the directory $handler … ![]() | |
Re: Also always try to habit of mysql_error so once there is something wrong with query your code wont execute further. [CODE] $rs=mysql_query($sql) or die( '<br /><strong>Your Query: </strong>'.$sql.'<br /><br /><strong>Error: </strong>'.mysql_error()); [/CODE] | |
Re: I have changed select query. Check this. [CODE] <?php $con = mysql_connect('localhost','root',''); if (!$con) { die("Could not connect: " . mysql_error()); } mysql_select_db('users',$con); $user = $_POST['username']; $result= mysql_query("SELECT * FROM users_info WHERE username='".$user."'"); if (mysql_num_rows($result) == 0) { die("Error: Username is not in our database! Make sure you check the … | |
Re: Its good idea, But in India we can't send sms this way. :( | |
Re: What i understood, Your calculation is giving 2.33 not 1.73. (10 * 1.00) + (20 * 2.00) + (30 * 3.00) ---------------------------------- SUM(Quantity) => 140 / 60 => 2.33 Check this query. [CODE] SELECT sum( ( Quantity * Price ) ) , sum( Quantity ) , sum( ( Quantity * … | |
Re: [URL="http://econym.org.uk/gmap/example_map.htm"]http://econym.org.uk/gmap/example_map.htm[/URL] | |
Re: Error is based on coding and logic. You have to increase your memory limit. ini_set(’memory_limit’, '20M'); But if your script is in end level recursion, above solution wont work. Make sure your recursive function has one limit and break somewhere. | |
Re: If you are testing this page in local then it won't work. You need smtp setting for sending email. For other error post the error you are getting. | |
Re: I have checked in IE9.. its working fine. Same view as firefox. Whats issue? | |
Re: You can do this by htaccess. This is a file named '.htaccess' which you have to put at root of your required project. You have to write rules in htaccess to generate url. Visit [URL="http://www.generateit.net/mod-rewrite/"]http://www.generateit.net/mod-rewrite/[/URL] to generate simple rules. | |
Re: @divya: i don't think you can get browser close event. It works only on some browser, i have tried it in past. If your code works in all browser post here for others use. | |
Re: Your mysql credentials is wrong apart from that The string error is because on [CODE]define("SITE_PATH", "D:\Hosting\6585577\html\rhythmmovement\");[/CODE] The last \ (back slash) ignore double qoute and string is broken. Try below. [CODE]define("SITE_PATH", "D:\Hosting\6585577\html\rhythmmovement\\");[/CODE] ![]() | |
Re: I have made this code in past. Hope this will help you.Add it in your code and echo query you will understand it. You can change upto your requirement. [CODE] <? function searchString($str,$matchAr) { $out = ''; $str = preg_replace('/\s\s+/', ' ', $str); $temp = explode(' ',$str); foreach($matchAr as $match) … | |
Re: BTW its different question but how to see that query has examined how many record? I am having mysql query browser and phpmyadmin. | |
Re: You have placed this code on top. [CODE] $query1 = 'UPDATE flexi SET allocation = "allocated", user = "'.$_SESSION["username"].'" WHERE flexi="flexi1"'; $result1 = mysql_query($query1); $result1 = $_SESSION['allocate']; $query2 = 'UPDATE flexi SET allocation = "allocated", user = "'.$_SESSION["username"].'" WHERE flexi="flexi2"'; $result2 = mysql_query($query2); $result2 = $_SESSION['alloc']; [/CODE] That means each … | |
Re: [CODE] <? define('SITE_ROOT_PATH',$_SERVER['DOCUMENT_ROOT'].'testproject/') include(SITE_ROOT_PATH.'config.php'); ?> [/CODE] You can add above code in any file of any directory of testproject. | |
Re: Try this. [CODE] <? $cnt = 1; foreach($images->photos->photo as $photo) { if($cnt==1 || (($cnt-1)%4==0)) echo '<div>'; echo '<a href="http://flickr.com/photos/' . $flickr->username . '/' . $photo->attributes()->id . '"><img src="http://farm' . $photo->attributes()->farm . '.static.flickr.com/' . $photo->attributes()->server . '/' . $photo->attributes()->id . '_' . $photo->attributes()->secret . '_s.jpg" width="55" height="55" alt="flickr"/></a>'; if($cnt==count($images->photos->photo) || $cnt%4==0) … | |
Hi All, I am a website developer. I need to take demo video of my website without sound for representing it to the client. I also want to add text callout or help notes along with screen capture(e.g. 'click on submit button','Fill username'..etc like snagIt). I am looking for such … | |
| |
Re: Debug your code with echo. echo both select script and run it in phpmyadmin. Post what you are getting. [CODE] <?php if ($_POST['submit-login']) { $sql = "SELECT * FROM `users` WHERE `username` = '" . mysql_escape_string($_POST['username']) . "' && `password` = '" . mysql_escape_string(md5(SALT_KEY . $_POST['password'] . SALT_KEY)) . "'"; … | |
Re: How php string works?? In php you can give single quote or double quote for defining string. If you start with single quote, php will find next single quote for completion of it.In middle you can also use double quote. Dot(.) is used for two string concatenation. Same for double … ![]() | |
Re: You can use [B][I] [/I][/B] in HTML code to give space. | |
Re: use CODE tags to post your code. What error are you getting? Are you using single or double quote in notepad text? | |
Re: As a fresher you will be confuse what to read and from where? As a starter you can learn below points from Google. - Refer basic functions like echo, print, exit, die, mail, implode, explode, count. echo and exit will be useful for debug your output. - How to submit … | |
Re: Try this code. [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=utf-8" /> <title>Untitled Document</title> </head> <body> <script language="javascript"> function checkvalue() { var grWeight = parseInt(document.getElementById('grWeight').value); var netWeight = parseInt(document.getElementById('netWeight').value); var crWeight = parseInt(document.getElementById('crWeight').value); document.getElementById('grWeight').style.backgroundColor = '#FFFFFF'; document.getElementById('netWeight').style.backgroundColor = '#FFFFFF'; document.getElementById('crWeight').style.backgroundColor = '#FFFFFF'; … | |
![]() | |
Re: [CODE] function resizeImage($sourceFile,$destFile,$width = '',$height ='') { $proportional = true; $output = 'file'; copy($sourceFile,$destFile); $file = $destFile; if ( $height <= 0 && $width <= 0 ) return false; # Setting defaults and meta $info = getimagesize($file); $image = ''; list($width_old, $height_old) = $info; $final_width = 0; $final_height = 0; … | |
Re: is this page outside of admin folder? | |
Re: Your email mime type is text, you need HTML type in header. [CODE] $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n"; [/CODE] | |
Re: This post should be in Internet Marketing > Search Engine Optimization. | |
Re: When you edit mark then you are passing its id 0253 to edit page. Now again you want to edit 'stick' then pass mark id(0253) and stick id so when you update 'stick' you can back to last page using mark's id. | |
Re: If you want to learning then its good, otherwise there are thousands of ready script. Better to use them. phpclasses have good classes. | |
Re: index.php?showforum=2 won't redirect you at forum-2.html. You have to make your href and redirection such that forum-2.html will comes in url. | |
Re: I know its your first post, but at least should have sense how would people know your problem without describing. And yeah have practice with code tag to post code. | |
Re: [CODE]RewriteEngine On RewriteRule ^brandid/([^/]*)/([^/]*)$ /products.php?brandid=$1&pname=$2 [L] [/CODE] Above code will rewrite [url]http://www.3gphone.in/brandid/27/Acer[/url] to [url]http://www.3gphone.in/products.php?brandid=27&pname=Acer[/url] If your coding is fetching list from brandid then you have to pass it in URL. |
The End.