- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 1
- Downvoting Members
- 2
48 Posted Topics
Re: [QUOTE=Atli;1054502]The problem is that the code relies on your browser to correctly align the <div> elements. When the tree is wider then the browser window, the browser automatically re-arranges the <div> elements to fit the window size. What you need to do to get around this is to create a … | |
How to store the following curl_exec output into mysql table? sent,success,114661698,709081462,+919900123456 sent,success,134707665,937687314,+917795987654 Eg: var1='sent' var2='success' var3='114661698' var4='709081462' var5='+919900123456' --------------------------------------------------- var1='sent' var2='success' var3='134707665' var4='937687314' var5='+917795987654' Thanks in advance | |
Getting the follwoing error message. How to fix this? **Parse error: syntax error, unexpected end of file in** Actual Code: <?php session_start(); include("connection.php"); $sqlsettings = "SELECT * from admin"; $resultsettings = mysql_query($sqlsettings); $rowsettings = mysql_fetch_array($resultsettings); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title><?php echo $rowsettings['ScriptName']; ?> … | |
How to remove duplicate mobile numbers from input text box1 and print the result into text box2. Example mobile nos: 7795012345 7795012345 7795012345 7411312354 7411312354 9900454321 9900454321 9632554123 9632554123 output should be: 7795012345 7411312354 9900454321 9632554123 <?php $myarray = array(); $myarray['numbers']=$_POST['numbers']; foreach($myarray as $num){ $numbers=$num; } $unique = array_unique($numbers); $output=implode("<br … | |
The following table query is not executing properly, what is the correct syntax? $m_query = 'Insert into'.$job_id.'(`mobile`,`routeID`,`status`) values ('$mobile','$routeID','Sent')'; | |
How to decode and store the following code values like city, zip, region etc into separate variables in PHP a:14:{s:4:"city";s:7:"Bijapur";s:3:"zip";s:6:"586101";s:3:"lat";d:16.83329963684082;s:2:"as";s:33:"AS9829 National Internet Backbone";s:5:"query";s:13:"59.99.192.232";s:6:"region";s:2:"KA";s:10:"regionName";s:9:"Karnataka";s:3:"org";s:4:"BSNL";s:3:"isp";s:4:"BSNL";s:7:"country";s:5:"India";s:11:"countryCode";s:2:"IN";s:3:"lon";d:75.69999694824219;s:6:"status";s:7:"success";s:8:"timezone";s:12:"Asia/Kolkata";} | |
PHP Code to create table. $create_q = 'CREATE TABLE IF NOT EXISTS `' . $job_id . '` ( `id` int(11) NOT NULL auto_increment, `mobile` bigint(20) NOT NULL, `routeID` int(11) NOT NULL, `status` varchar(20) NOT NULL default `Sent`, `handler` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) '; Mysql Error: You have … ![]() | |
xml output: <balance> <credits>39660</credits> </balance> how to fetch the xml output from url and store the credits i.e. 39660 into php variable. the above xml output is coming from following url http://www.xyz.com/check-balance.php?username=ssgent&password=ssgentr check-balance.php code: <?php require('dbcon.php'); include('encrypt.php'); include('functions.php'); $username = $_GET['username']; $password = $_GET['password']; $password = encrypt($password, 'riffre'); $url = … | |
How to search a string in table i.e. searchstring = "Gandhi Chowk" actual code: if(isset($_POST['companyId'])){ $companyId = $_POST['companyId']; } if(isset($_POST['RouteName'])){ $routeName = '%'.$_POST['routeName'].'%'; } if(isset($_POST['cityName'])){ $cityName = $_POST['cityName']; } // We Will prepare SQL Query $STM = $dbh->prepare("SELECT routeName FROM route WHERE routeName LIKE :route"); // bind paramenters, Named paramenters … | |
I am writting remider service script it should remind the due amount before 3 days in a particular month once in a year. My code is working fine for current month, but how to set reminder if current date is 2015-07-30 but the actual due date will be in next … ![]() | |
Unable to execute code, displaying blank page. $q = 'SELECT id,username,email,mobile FROM users WHERE email=:email OR mobile=:mobile'; $query = $dbh->prepare($q); $query->execute(array(':username' => $username, ':email' => $email,':mobile' => $mobile)); if($query->rowCount() == 0){ while($row = $query->fetch(PDO::FETCH_ASSOC)){ if($row[2] == $email) { if($row[3] == $mobile) { echo 'Mobile Number and Email are already registered … | |
the if condition is not executing and unable to print result, there is a blank page. <?php $url = $_SERVER['HTTP_HOST']; $url_length = strlen($url); if(substr($url, 0, 4 ) = 'www.') { $url_length = $url_length - 4; $url = substr($url, 4, $url_length); } echo $url_length.'<br />'.$url; ?> ![]() | |
Displaying blank page after inserting PHP code in between DIV tags, the code is as follows: <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Bulk Sms</title> <link rel="stylesheet" href="css/styles.css" type="text/css"> <link rel="stylesheet" href="css/responsive-nav.css"> <script src="js/responsive-nav.js"></script> </head> <body> <div class="inner"> <a href="index.php"> <img src="images/logo.png" alt="Bulk Sms" … | |
How to fix the following SQL error? 1You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`Sent`, `handler` varchar(20) NOT NULL, PRIMARY KEY (`id`) )' at line 5 Code: $create_q = 'CREATE TABLE IF … | |
Executing Code upto insert users: <?php require('session.php'); require('encrypt.php'); require('mail.php'); $username = $_POST['user_name']; $password = rand(10000, 99999); $name = $_POST['name']; $password = encrypt($password, 'ganesh'); $email = $_POST['email']; $terms = $_POST['terms']; $address = $_POST['address']; $mobile = $_POST['mobile']; $dob = $_POST['birth_year'] . '-' . $_POST['birth_month'] . '-' . $_POST['birth_day']; $ip = $_SERVER['REMOTE_ADDR']; $url … | |
how to store json output into seperate PHP variables? {"msg":"success","msg_text":{"9912345678":"N"}} ![]() | |
which kind of password encryption is this mqqemZ0= ![]() | |
I got smpp class from [Click Here](http://www.phpclasses.org/package/1373-PHP-Sends-SMS-messages-via-an-SMPP-server.html) i am able to send sms to the single mobile number using SMPP connection but unable to send sms to multiple mobile numbers The code is as follows: <?php include_once('smppclass.php'); /* File: smppexample.php Implements: exmaple for smppclass.php::SMPPCLass() License: GNU Lesser Genercal Public License: … ![]() | |
how to put `where clause variable $didno` in following code: $pdo = Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT * FROM misscall WHERE did_no = ?"; $q = $pdo->query($sql); $mobile1 = array(); while ($mobi1 = $q->fetchColumn()) { $mobile1[] = $mobi1; } $mobile1list = join(",", $mobile1); Database::disconnect(); thanks in advance ![]() | |
the success message is not displaying after form submission, still it's displaying error message "Please enter a valid mobile number." it should display Success message. <?php function filterMobileno($field){ // Sanitize mobile number $field = filter_var($field, FILTER_SANITIZE_NUMBER_INT); // Validate mobile number if(filter_var($field, FILTER_VALIDATE_INT)){ return $field; }else{ return FALSE; } } // … ![]() | |
Array ( [0] => Array ( [sn] => 1 [mob_no] => 9602858989 [date] => 06-May-2015 [time] => 12:02:33 PM ) [1] => Array ( [sn] => 2 [mob_no] => 7795055128 [date] => 06-May-2015 [time] => 12:29:44 PM ) ) how to insert these array values in seperate database table fields? ![]() | |
my json decode script throwing error i.e. Error : DATA FETCH My code: <?php $api_url = '{"msg":"SUCCESS","msg_text":"DATA FETCH","data":[{"sn":1,"mob_no":"9602858989","date":"06-May-2015","time":"12:02:33 PM"},{"sn":2,"mob_no":"7795055128","date":"06-May-2015","time":"12:29:44 PM"}]}'; $output = file_get_contents($api_url); if($output=="") { echo "No output received"; } else { $arr_output = json_decode($output, true); if(isset($arr_output['msg'])) { $msg = $arr_output['msg']; $msg_text = $arr_output['msg_text']; if($msg == "success") { if(isset($arr_output['data'])) { … | |
I am new for MySQL my tables structures are as follows Table: registration ---------------------------------- | cardNo | mainAgentId |subAgentId| ---------------------------------- | 100 | 1 | 4 | ----------------------------------- | 101 | 1 | 5 | ----------------------------------- | 103 | 2 | 6 | ----------------------------------- | 102 | 1 | 4 … ![]() | |
Unable to execute the sql query, only dispaying blank page. <?php require('fpdf.php'); $today=date('d_m_Y'); $hostname = "localhost"; $database = "developer"; $username = "root"; $password = ""; $conn = mysql_connect($hostname, $username, $password) or die(mysql_error()); mysql_select_db($database, $conn); class PDF_result extends FPDF { function __construct ($orientation = 'P', $unit = 'pt', $format = 'Letter', … | |
i have a database table with fields mobno1 and mobno2, first i would like store all the values of field mobno1 into var1 and field mobno2 into var2 by using comma seperator and pdo. my code is as follows. $pdo = Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT mobno1,mobno2 FROM custreg"; … | |
displaying blank page index.php // connection.php $server = "localhost"; $user = "root"; $password = ""; $dbName = "matrimony"; $conn = mysql_connect($server,$user,$password, $dbName) or die("There was a problem connecting to MySQL. Please try again later."); if (!@mysql_select_db($dbName, $conn)) { die ("There was a problem connecting to the database. Please try again … ![]() | |
unable to insert values into mysql table, only showing blank page. but after commenting mysql query code it's displaying echo $success part and not throwing any error message. code: if(!empty($_POST)) { // keep track validation errors $first_nameError = null; $last_nameError = null; $mobile_number1Error = null; $addressError = null; $magent_cityError = … | |
i've 3 files 1) search-installment.php 2) pay-installment.php 3) update_installment.php first step enter card no into search-installment.php posting value search_cardno to pay-installment.php then updating particular installment row clicking pay button in that row which opens form in modal window after pressing submit button it's updating data in table, but while refreshing … ![]() | |
i've stored a line into string `$output='01/07/201521/08/201691754.0';` i want split the line as three different words & store into variables var1 var2 and var3. eg: var1=01/07/2015 var2=21/08/2016 var3=91754.0 hope someone will fix this issue. | |
i've two files one is send-data.php which contains html form and another one is receive-data.php, i am converting the form value as session value into second file and printing using echo. but it's not printing the output. //send-data.php <?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html … | |
I'm trying to pass the ac_no contained in my database table to a form that's displayed within a Bootstrap Modal upon clicking a button. My code is as follows. <?php $mydata = mysql_query("SELECT * FROM slabpay WHERE ac_no='$ac_no'"); while($record = mysql_fetch_array($mydata)) { $id=$record['id']; ?> <tr class='fired' id='<?php echo $record['id']; ?>'> … | |
program fetching text file contents into array, and storing array variable values into example.csv file. The values are not storing column wise. ----------------- text file content ----------------- THE SAHARA CO-OP CREDIT SOCIETY LTD MUMBAI OVERDUE LIST OF P NO :1 PERSONAL LOAN AS ON 31/08/2014 ---------------------------------------------------------------------------------------------------------------------------------- S.NO A.NO NAME SAN … | |
how to convert this old fastioned mysql statements to pdo? <?php error_reporting(0); define("host","localhost"); define("user","root"); define("password",""); define("db","pass2"); $connect_db=mysql_connect(host,user,password) or die("cannot connect"); mysql_select_db(db, $connect_db); $username=strtolower(addslashes($_POST['username'])); $password=strtolower(addslashes($_POST['password'])); $sql="SELECT * FROM users WHERE username='$username' AND password='$password'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $count=mysql_num_rows($result); if($count==1 && $_POST['userlevel'] == "admin") { session_start(); $_SESSION['id']=$row['id']; header("location: admin.php"); } else if($count==1 && $_POST['userlevel'] … | |
unable to insert data into table user_detail using jquery i've three files index.php, upload.php, function.php // index.php <?php require_once('function.php'); session_start(); if (!is_user()) { redirect('signin.php'); } $ip = $_SERVER['REMOTE_ADDR']; ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Home</title> <link rel="stylesheet" type="text/css" href="css/pure-min.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <link href="css/uploadfile.css" rel="stylesheet"> <script src="js/jquery.min.js"></script> … | |
here i am using fpdf class to generate pdf document, how to print serial numbers in SL.NO. column in sequential order i.e. 1 2 3 4 5 ... so on. <?php include_once('include/dbConnect.inc.php'); require('fpdf.php'); $d=date('d_m_Y'); $agentid=mysql_real_escape_string($_GET['agent']); $agent_name=mysql_real_escape_string($_GET['agentname']); // Query to select an int column $query = "select count(*) as cnt from … | |
The following code unable to insert null or blank value into table called custreg i.e. $sagentid and $sagentname. if(isset($_POST['Submit'])){ $reg_no=$_POST['reg_no']; $firstname=strtoupper(str_replace(',', '' , $_POST['firstname'])); $lastname=strtoupper(str_replace(',', '' , $_POST['lastname'])); $mobno1=$_POST['mobno1']; $mobno2=$_POST['mobno2']; $address=strtoupper($_POST['address']); $city=strtoupper($_POST['city']); $dateofjoin=$_POST['dateofjoin']; $regfee=$_POST['regfee']; $magentid=$_POST['magentid']; $sagentid=$_POST['sagentid']; $skimcity=$_POST['skimcity']; $skimyear=$_POST['skimyear']; $skimname=$_POST['skimname']; $cust_fullname = $firstname.' '.$lastname; $pdo = Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = … | |
Update form is working perfectly, but the value of $magentname variable changing to blank without selecting drop down box value. code: <?php require 'include/database.php'; require 'include/settings.php'; $id = null; if ( !empty($_GET['id'])) { $id = $_REQUEST['id']; } if ( null==$id ) { header("Location: sub-agents-list.php"); } $mainagentid = $_POST["mainagentid"]; $pdo = … | |
I am new to PDO, i am trying to insert values into database table. but the script is not inserting any values nor displaying error message.help me to fix this issue. <?php require 'include/database.php'; require 'include/settings.php'; if ( !empty($_POST)) { // keep track validation errors $firstnameError = null; $lastnameError = … ![]() | |
i am trying to generate pdf file using fpdf selecting data from two different tables i.e. table custreg and table slabpay, but getting MySQL error: "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in D:\inetpub\vhosts\kisan.net\httpdocs\greengold\exportpdf.php on line 124". Code: $strSQL = "SELECT custreg.mobno1, slabpay.ac_no, slabpay.cust_name, slabpay.install_no, GROUP_CONCAT(`slabpay.install_amt` … | |
I've cust_name and install_no columns in table, each customer's name repeated 12 times as rows how to insert numbers 1 to 12 in install_no column for all rows. table sample: ----------------------------- cust_name | install_no ---------------------------- ROGER | 1 ---------------------------- ROGER | 2 ---------------------------- ROGER | 3 ---------------------------- ROGER | 4 … ![]() | |
how to update table in foreach loop with where clause my code: foreach($output as $var) { $tmp = explode(",", $var); $collec_date = $tmp[2]; $cust_id = $tmp[4]; $cust_name = $tmp[5]; $install_no = $tmp[6]; $amount = $tmp[7]; $sql = "UPDATE ankali_slabpay SET install_date='$collec_date', install_amt='$amount' WHERE ac_no='$cust_id' AND install_no='$install_no' AND $install_amt='000000' GROUP BY … | |
$a = array(000,400,000,500); $b = array(300,400,450,500); $i=0; foreach($b as $k=>$v) { if($v==$a[$i]) { $b[$k]='000'; } $i++; } print_r($b); i want same thing in two dimensional array $a = Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) [1] => Array ( [0] => … | |
i am getting array output as: Array ( [0] => Array ( [0] => 000000 [1] => 000400 [2] => 000450 ) ) Array ( [0] => Array ( [0] => 000350 [1] => 000400 ) ) i want output like this: Array ( [0] => Array ( [0] => … ![]() | |
table slabpay ------------------------------------------------------- agent_id|agent_name|cust_id|cust_name|installment_amt| ------------------------------------------------------- 1 |mike |1 |john |350 | ------------------------------------------------------- 1 |mike |1 |john |400 | ------------------------------------------------------ 1 |mike |2 |abraham |350 | ------------------------------------------------------- 1 |mike |1 |john |450 | ------------------------------------------------------- 1 |mike |2 |abraham |400 | ------------------------------------------------------- mysql query ------------------------------------------------------ `$select = mysql_query("SELECT cust_id, cust_name,installment_amt FROM slabpay … ![]() | |
my actual code is: $agent_id=mysql_real_escape_string($_GET['memberid']); $result = mysql_query("SELECT id,ac_no,agent_name FROM ankali_slabpay WHERE agent_id=$agent_id ORDER BY id DESC LIMIT 1"); $row = mysql_fetch_array($result); $ac_number=$row['ac_no']; $agent_name=$row['agent_name']; ?> <?php $b = array(000350,000400,000450); //pre-defined installment amount values $replacement = "000000"; $cust_mast = '$C21'; $bank_name = 'KISAN SWARAJ'; $dfile = "READ ME CUSTOMERS.txt"; $fo = … | |
how to convert install_amt to comma delimited array $select = mysql_query("SELECT ac_no,cust_name,install_amt,GROUP_CONCAT(install_amt) FROM ankali_slabpay WHERE agent_id=$agent_id GROUP BY ac_no"); $a=array(); while($row1 = mysql_fetch_assoc($select)){ $installment = $row1['GROUP_CONCAT(install_amt)']; $a=explode(",",$installamt); ![]() | |
Array1 = array(000,400,000,500) Array2 = array(300,400,450,500) if the values of Array1 matches with Array2 values then the matching values of Array2 should be replaced with 000 i.e. Array2 = array(300,000,450,000) somebody help me. thanks in advance | |
I'm working on MLM script i.e. Auto filling nodes, how to display empty tree node images and replace them with filled images by fetching matching record using PHP Mysql. Please refer to the following screen shot. [url=http://www.freeimagehosting.net/][img]http://www.freeimagehosting.net/uploads/bb2140a87c.jpg[/img][/url] thanks in advance |
The End.