619 Posted Topics
Re: 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. | |
![]() | Re: [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"]; … ![]() |
Re: 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] | |
Re: what is the name of the staffname field in table? Are passing array to function? | |
Re: 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 … | |
Re: 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. | |
Re: 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] | |
Re: [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] | |
Re: it's demo is not working on given link. | |
Re: You must filter your select query based on selection. | |
Re: 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 … | |
Re: 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] | |
![]() | Re: 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'); … ![]() |
Re: 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. | |
Re: 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] | |
Re: 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] | |
Re: [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] | |
Re: 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] | |
Re: Can you post your input string and expected output string? | |
Re: 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] ![]() | |
Re: 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] | |
Re: 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 … | |
Re: [url]http://lmgtfy.com/?q=php+form+validation[/url] | |
Re: 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] | |
Re: [URL="http://tinymce.moxiecode.com/wiki.php/Configuration:mode"]http://tinymce.moxiecode.com/wiki.php/Configuration:mode[/URL] | |
![]() | |
Re: 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 … | |
Re: 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" … | |
Re: 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. ![]() | |
Re: 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 … | |
Re: 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 … | |
Re: [URL="http://www.w3schools.com/PHP/php_mysql_insert.asp"]http://www.w3schools.com/PHP/php_mysql_insert.asp[/URL] | |
Re: 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] | |
Re: Alert box is client side property, that can not be accessed via PHP. Any reason why you don't want JS? | |
Re: 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] | |
Re: Loading time is not fixed every time. It may differ. check [URL="http://www.iwebtool.com/speed_test/"]this[/URL] for any site. ![]() | |
Re: 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] | |
| |
Re: As kartik said you only need to run query part in phpmyadmin, not PHP. | |
Re: 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] | |
Re: Is it same with [url]http://www.daniweb.com/web-development/php/threads/360866[/url] ? | |
Re: 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 … | |
Re: 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] | |
Re: 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] | |
Re: thank-you.html is in form action so page is redirecting to there. | |
Re: you want language translator? You can use google translator for that. | |
Re: Try this. [CODE] RewriteEngine On RewriteRule ^([^/]+)$ /index.php?url=$1 [L] RewriteRule ^/article/([^/]+)$ /index.php?url=$1&type=news [L] [/CODE] | |
Re: 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] | |
Re: 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. … | |
Re: Post complete loop code. There should be something wrong in loop only. |
The End.