619 Posted Topics

Member Avatar for abhi10kumar

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 { …

Member Avatar for vibhaJ
0
136
Member Avatar for jacob21

Other than API you can use phpmailer class and add addresses as bcc in email.

Member Avatar for mschroeder
0
150
Member Avatar for jacksantho

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]

Member Avatar for vibhaJ
0
30
Member Avatar for youvi

[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]

Member Avatar for vibhaJ
0
65
Member Avatar for DILO3D

I haven't tried but exec may help you. [CODE] exec('/etc/init.d/httpd graceful'); [/CODE]

Member Avatar for Pro2000
0
254
Member Avatar for altarek

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)); …

Member Avatar for vibhaJ
0
174
Member Avatar for vibhaJ

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 …

Member Avatar for pritaeas
0
92
Member Avatar for hermann87

Yes.. Try to debug printed sql query in phpmyadmin. [CODE] echo $sql = "INSERTO INTO users (username) VALUES (?)"; exit; [/CODE]

Member Avatar for hermann87
0
143
Member Avatar for chaychie

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" …

Member Avatar for divyakrishnan
0
1K
Member Avatar for Tigermes

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]

Member Avatar for diafol
0
420
Member Avatar for naru vaishnaw
Member Avatar for naru vaishnaw

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.

Member Avatar for diafol
0
221
Member Avatar for altarek

[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]

Member Avatar for vibhaJ
0
94
Member Avatar for Joe34

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.

Member Avatar for karthik_ppts
0
224
Member Avatar for narekm

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 …

Member Avatar for diafol
0
319
Member Avatar for iranmovie

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]

Member Avatar for dhruv_arora
0
298
Member Avatar for wilko1995

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 …

Member Avatar for karthik_ppts
0
110
Member Avatar for krabz01
Member Avatar for vibhaJ
0
342
Member Avatar for jrotunda85

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 * …

Member Avatar for vibhaJ
0
159
Member Avatar for sam230

[URL="http://econym.org.uk/gmap/example_map.htm"]http://econym.org.uk/gmap/example_map.htm[/URL]

Member Avatar for karthik_ppts
0
136
Member Avatar for programmer12

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.

Member Avatar for programmer12
0
118
Member Avatar for bishaw

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.

Member Avatar for IIM
0
169
Member Avatar for ashiiiish
Member Avatar for programmer12
Member Avatar for programmer12
0
137
Member Avatar for aldm

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.

Member Avatar for aldm
0
264
Member Avatar for swilliamrobert

@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.

Member Avatar for divyakrishnan
0
214
Member Avatar for dmelgray

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]

Member Avatar for diafol
0
208
Member Avatar for knitex

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) …

Member Avatar for karthik_ppts
0
152
Member Avatar for aithabuddy

BTW its different question but how to see that query has examined how many record? I am having mysql query browser and phpmyadmin.

Member Avatar for karthik_ppts
0
169
Member Avatar for pantera989

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 …

Member Avatar for vibhaJ
0
1K
Member Avatar for jrotunda85

[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.

Member Avatar for jrotunda85
0
131
Member Avatar for jrotunda85

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) …

Member Avatar for jrotunda85
0
148
Member Avatar for vibhaJ

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 …

Member Avatar for jingda
0
305
Member Avatar for Rewired
Member Avatar for MrDJK
0
250
Member Avatar for ElliottDuke

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)) . "'"; …

Member Avatar for ElliottDuke
0
282
Member Avatar for nigelsponge

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 …

Member Avatar for diafol
0
519
Member Avatar for svmer
Member Avatar for ashiiiish

use CODE tags to post your code. What error are you getting? Are you using single or double quote in notepad text?

Member Avatar for pixelsoul
0
117
Member Avatar for rotten69

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 …

Member Avatar for rotten69
0
517
Member Avatar for manu555

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'; …

Member Avatar for manu555
0
1K
Member Avatar for geekme
Member Avatar for didi00

[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; …

Member Avatar for didi00
0
521
Member Avatar for rusty813
Member Avatar for rakibtg

Your email mime type is text, you need HTML type in header. [CODE] $headers .= "Content-Type: text/html; charset=\"iso-8859-1\"\n"; [/CODE]

Member Avatar for rakibtg
0
193
Member Avatar for taroo2ah
Member Avatar for mahmudfaisal

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.

Member Avatar for vibhaJ
0
145
Member Avatar for mangel.murti

If you want to learning then its good, otherwise there are thousands of ready script. Better to use them. phpclasses have good classes.

Member Avatar for mangel.murti
0
114
Member Avatar for haimz

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.

Member Avatar for haimz
0
369
Member Avatar for shyam2011

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.

Member Avatar for vibhaJ
-1
1K
Member Avatar for abhi10kumar

[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.

Member Avatar for vibhaJ
0
2K

The End.