619 Posted Topics

Member Avatar for hawx

Hi if you check jquery UI [URL="http://jqueryui.com/demos/accordion/"]demo here[/URL]. Once you click on another widget rest will automatically closed.

Member Avatar for vibhaJ
0
78
Member Avatar for OldDeveloper01

[CODE] <?php require ("scripts/connect.php"); $dynamicList = ""; $sql = mysql_query("SELECT * FROM products WHERE category = 'anyoccasion'"); $productcount = mysql_num_rows($sql); // count the output amount if ($productcount > 0) { $cnt = 0; $perRowProduct = 3; $dynamicList .= '<table width="100%" border="0" cellspacing="0" cellpadding="6">'; while($row = mysql_fetch_array($sql)) { $id = $row["id"]; …

Member Avatar for OldDeveloper01
0
172
Member Avatar for rabeeshm

Use stripslashes function to display content. [URL="http://in2.php.net/manual/en/function.stripslashes.php#example-4053"]http://in2.php.net/manual/en/function.stripslashes.php#example-4053[/URL]

Member Avatar for vibhaJ
0
103
Member Avatar for Nybuler

what is the name of the staffname field in table? Are passing array to function?

Member Avatar for vibhaJ
0
118
Member Avatar for kiran.madke

You can use paypal IPN for that. Website owner must have business account in paypal. Once account is generated he can create API credintials i.e. API_UserName, API_Password, API_Signature which will be used in php coding. Here is a sample code link : [url]https://cms.paypal.com/cms_content/US/en_US/files/developer/nvp_DoDirectPayment_php.txt[/url] Now in your website you have to …

Member Avatar for vibhaJ
0
76
Member Avatar for jacksantho

Below is JavaScript for submitting form on change of drop-down. [CODE] print "<select name='ccrseid' onchange='document.getElementById('formId').submit();'>"; [/CODE] Where formId is the id of form tag.

Member Avatar for vibhaJ
0
949
Member Avatar for Hakoo

You can also use loop for getting its value. [CODE] <? $chk_list = $_POST['chk_list']; foreach($chk_list as $key=>$Veh_id) { echo '<br />'.$Veh_id.' is checked'; } ?> [/CODE]

Member Avatar for vibhaJ
0
210
Member Avatar for mafhh14

[URL="http://stackoverflow.com/questions/188452/reading-writing-a-ms-word-file-in-php?tab=oldest#answer-265079"]this may be helpful to u[/URL]

Member Avatar for vibhaJ
0
86
Member Avatar for muralibobby2015
Member Avatar for niche1
Member Avatar for AboJaD

You forget mysql_query function before while. [CODE] <? $sql="SELECT * FROM registered_members WHERE firstname LIKE '".$q."%' OR lastname LIKE '".$q."%'"; $rs = mysql_query($sql); While($row = mysql_fetch_array($rs)){ $id= $_SESSION['SESS_MEMBER_ID']; //current user ID. $x_id= $row['member_id']; $result = mysql_query("SELECT registered_members.firstname,registered_members.lastname,registered_members.member_id,friends.m_id,friends.f_id,friends.restriction FROM registered_members,friends WHERE (m_id=$id AND f_id=$x_id AND restriction='green') OR (f_id=$id AND m_id=x_id AND …

Member Avatar for vibhaJ
0
142
Member Avatar for phpDave

Try this code and see what error you are getting. [CODE] <? echo $query= "SELECT * FROM table WHERE col1 LIKE '%$search_Recordset2%' OR col2 LIKE '%$search_Recordset2%' OR col3 LIKE '%$search_Recordset2%'"; $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } ?> [/CODE]

Member Avatar for phpDave
0
157
Member Avatar for diafol

You just want to use the array values of newvalues.php to template.php. I am not sure if i am correct or not. Check below code. [CODE] <? include('newvalues.php'); echo '<h2>New Values</h2>'; echo '<pre>'; print_r($lang); $langTemp = array( 'this_key' => 'some other value', 'something_else_key' => 'an old value', 'another_key' => 'spaghettiness'); …

Member Avatar for diafol
0
160
Member Avatar for charvie

i was also having such requirement once. Then what i have done is: create zip file of multiple files using php and then download that zip file. Thus user can have multiple files in one zip.

Member Avatar for FloridaCI
0
134
Member Avatar for abhi10kumar

If data type is timestamp it will automatically take current datetime. You don't need to add it in insert query. [CODE] <?php include("connect_mysql.php"); $date=date("Y-m-s H:i:s"); mysql_query("insert into buy_db (from_site, model, ip) values ('".$_REQUEST['site']."', '".$_REQUEST['model']."', '".$_REQUEST['ip']."')"); //header('Location:'.$_REQUEST['url']); ?> [/CODE]

Member Avatar for vibhaJ
0
166
Member Avatar for Xaelian

For dynamic combo box you can refer [URL="http://www.daniweb.com/web-development/php/threads/323889"]http://www.daniweb.com/web-development/php/threads/323889[/URL]

Member Avatar for Xaelian
0
89
Member Avatar for raghujosh

[CODE] <? $count = 0; $result_stringXa = "<select> <option value = 'lb1'>ListItem1</option> <option value = 'lb2'>ListItem2</option> <option value = 'lb3'>ListItem3</option> </select>"; if(preg_match('<select>', $result_stringXa)) { $count++; } $string = $result_stringXa; $pattern = '/<select>/'; $replacement = "<select 'lb$count'>"; echo preg_replace($pattern, $replacement, $string); ?> [/CODE]

Member Avatar for vibhaJ
0
123
Member Avatar for dineshsurve

Try this code [CODE] $query="UPDATE $tbl_name SET Password = '".$new_Password."' WHERE Password='".$Curr_Password."' and id=$ID and Status=1"; $result = mysql_query($query) or die('Error : '.mysql_error()); if(mysql_affected_rows()) { echo 'Successfully Updated'; } else { echo 'Not Updated'; } [/CODE]

Member Avatar for vibhaJ
0
269
Member Avatar for raghujosh
Member Avatar for lovell_82

Replace this much code and check whether all three values are coming correct or not. If its correct that means code is right and problem is in mysql credentials. [CODE] function DBLogin() { echo '--host--'.$this->db_host.'--username--'.$this->username.'--pwd--'.$this->pwd; $this->connection = mysql_connect($this->db_host,$this->username,$this->pwd); [/CODE]

Member Avatar for diafol
0
539
Member Avatar for Nybuler

You need implode function.Which will bing array into string with comma ",". [CODE] $qryInsertLeaveApplication = "INSERT INTO global_leave_replacement_application (pic_staffcode)VALUES('".implode(',',$pic_staffcode)."')"; [/CODE]

Member Avatar for Nybuler
0
415
Member Avatar for sainigks

Below is mysql code. [CODE] CREATE TABLE `tbl_hindi` ( `data` varchar(1000) character set utf8 collate utf8_bin default NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `tbl_hindi` VALUES ('कंप्यूटर'); [/CODE] Below is PHP 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 …

Member Avatar for bibleaudio
0
2K
Member Avatar for umesh daiya
Member Avatar for karthik_ppts

Check this both.. You can see view source for reference. [url]http://www.subtlysimple.com/projects/circleoverlay/[/url] [url]http://maps.forum.nu/gm_sensitive_circle2.html[/url]

Member Avatar for karthik_ppts
0
245
Member Avatar for klemme

[URL="http://tinymce.moxiecode.com/wiki.php/Configuration:mode"]http://tinymce.moxiecode.com/wiki.php/Configuration:mode[/URL]

Member Avatar for vibhaJ
0
220
Member Avatar for begueradj
Member Avatar for rotten69

Why you are setting so much session variables? I think your logic is messy. Try below code if it helps you. [CODE] <? session_start(); // list of username and password $users = array("user1" =>"3202", "user2" =>"2002", "user3" =>"1061", "user4"=>"1400", "user5"=>"1001"); if( isset($_POST['username']) && isset($_POST['password']) ) // form sibmitted with username …

Member Avatar for vibhaJ
0
91
Member Avatar for ben.matthews18

I have modified it. If you don't have header then each time user press F5 mail will be sent. Its always good practice to have header after form submission. [CODE] <?php if(isset($_POST["send"])) { // php mail sending code header("location:contactus.php?succ"); exit; } ?> <form id="form1" name="form1" method="post" action=""> <table width="362" border="0" …

Member Avatar for vibhaJ
0
524
Member Avatar for Hakoo

MySQL is a relational database management system. Phpmyadmin is just a user interface with mysql. There are some software based tool like Workbench, SQLyog, Mysql query browser and some web based application like phpmyadmin.

Member Avatar for diafol
0
202
Member Avatar for mangel.murti

I prefer below steps: 1. create div for loading text or image. 2. With binding ajaxStart event we can show loading div. 3. With binding ajaxStop event we can hide loading div. 4. This way in you page whenever ajax ia called loading div will automatically shown. Below is code …

Member Avatar for mangel.murti
0
886
Member Avatar for Kieron Thomas

This is just demo code. Change your database table field names and run it. [CODE] <? if(isset($_POST['search'])) { echo 'Search Result :<br />'; $width = mysql_escape_string($_POST['width']); $profile = mysql_escape_string($_POST['profile']); $size = mysql_escape_string($_POST['size']); $where = " 1=1 "; if($width != "") $where.=" AND width='$width'"; if($profile != "") $where.=" AND profile='$profile'"; if($size …

Member Avatar for TySkby
0
148
Member Avatar for Ritesh_4

[URL="http://www.w3schools.com/PHP/php_mysql_insert.asp"]http://www.w3schools.com/PHP/php_mysql_insert.asp[/URL]

Member Avatar for astra2000
0
141
Member Avatar for johng123

See [URL="http://nl2.php.net/manual/en/function.sprintf.php#example-4031"]this example[/URL]. In you code you can change %1$s to %1 as all 3 string order is fixed. [CODE] echo $hyperlink = sprintf('<a href="http://%s" target="%s">%s</a>', 'url', 'target', 'showingtext'); [/CODE]

Member Avatar for vibhaJ
0
189
Member Avatar for rpv_sen

Alert box is client side property, that can not be accessed via PHP. Any reason why you don't want JS?

Member Avatar for rpv_sen
0
238
Member Avatar for cliffcc

You can use mysql_real_escape_string function before inserting data in mysql. [URL="http://in2.php.net/manual/en/function.mysql-real-escape-string.php"]http://in2.php.net/manual/en/function.mysql-real-escape-string.php[/URL]

Member Avatar for vibhaJ
0
129
Member Avatar for Mattshu

Loading time is not fixed every time. It may differ. check [URL="http://www.iwebtool.com/speed_test/"]this[/URL] for any site.

Member Avatar for diafol
0
62
Member Avatar for itisnot_me

Try this. [CODE] <? $replaced_content = " abcs is here {blog:vibhadevit} mnop dsgdh 3535 {blog:computer} after blog content"; preg_match_all('/{blog:[A-Za-z0-9_]+}/', $replaced_content, $matches, PREG_SET_ORDER); echo '<pre>'; print_r($matches); ?> [/CODE]

Member Avatar for itisnot_me
0
149
Member Avatar for cliffcc
Member Avatar for prajesh2
Member Avatar for Stefano Mtangoo
0
241
Member Avatar for cliffcc

You can use 'selected' for that. Check below code you will understand. [CODE] <select name="selectbox"> <option value="">- - Select - -</option> <option value="Computer">Computer</option> <option value="Hello" selected="selected">Hello</option> <option value="World">World</option> </select> [/CODE]

Member Avatar for vibhaJ
0
216
Member Avatar for umeshMCA

Is it same with [url]http://www.daniweb.com/web-development/php/threads/360866[/url] ?

Member Avatar for vibhaJ
0
91
Member Avatar for dalip_007

Here is a code for exporting table to csv. [CODE] <? mysql_connect('localhost','root',''); mysql_select_db('test'); $sql = "select student_name,student_sirname from student"; // Query Database $filename = 'file.csv'; $rsSearchResults = mysql_query($sql) or die(mysql_error()); $out = ''; // fiels to export $out .='Student Name,Sirname'; $out .="\n"; // Add all values in the table while …

Member Avatar for vibhaJ
0
122
Member Avatar for johng123

php code for drop down. [CODE] <? $sql = "select * from tbl_country"; $res = mysql_query($sql); echo '<select name="country">'; while($sar = mysql_fetch_assoc($res)) { echo '<option value="'.$sar['countryId'].'">'.$sar['countryName'].'</option>'; } echo '</select>'; ?> [/CODE]

Member Avatar for happytogether
0
154
Member Avatar for vijaysoft1

There are so many jquery form validations available, Check this both if anyone match your needs. [URL="http://www.raymondselda.com/php-contact-form-with-jquery-validation/"]http://www.raymondselda.com/php-contact-form-with-jquery-validation/[/URL] [URL="http://webcloud.se/log/Form-validation-with-jQuery-from-scratch/#demo-form"]http://webcloud.se/log/Form-validation-with-jQuery-from-scratch/#demo-form[/URL]

Member Avatar for Kannan R
0
4K
Member Avatar for Siberian
Member Avatar for Siberian
0
68
Member Avatar for MasterBerd

you want language translator? You can use google translator for that.

Member Avatar for chrishea
0
336
Member Avatar for codemonkey88

Try this. [CODE] RewriteEngine On RewriteRule ^([^/]+)$ /index.php?url=$1 [L] RewriteRule ^/article/([^/]+)$ /index.php?url=$1&type=news [L] [/CODE]

Member Avatar for codemonkey88
0
256
Member Avatar for hassan12345

Try this. [CODE] <?php $cnt = 0; if (($handle = fopen("test.csv", "r")) !== FALSE) { while (($csvadata = fgetcsv($handle, 0, ",")) !== FALSE) { $data[$cnt++] = $csvadata; } fclose($handle); unset($data[2]); } $fp = fopen('test.csv', 'w'); foreach ($data as $fields) { fputcsv($fp, $fields); } fclose($fp); ?> [/CODE]

Member Avatar for vibhaJ
0
4K
Member Avatar for dalip_007

Firstly you need to log some table data to compare in future. Lets say primary key of table. Create one table table_log which will have all primary key. [B]tbl_log:[/B] id primary_key datetime 1 12,13,14,16,19,20,21 timestamp 2 12,13,14,19,20,21,22,23 timestamp Now make one php script which will be set in cron job. …

Member Avatar for dalip_007
0
96
Member Avatar for masocha
Member Avatar for vibhaJ
0
82

The End.