39,316 Topics
| |
I would like to know if possible to convert this to the codeigniter active record way using this->db->join etc. What's the best. It works fine with the code I got but would like to make it work with codeigniter db active records. http://www.codeigniter.com/userguide2/database/active_record.html public function get_category($category_id) { $language_id = $this->check_language(); … | |
Please recommand me a good book or website where i can learn PHP Session. Actually a website will be more better thanks guys. Peace | |
Hi. I'm working on my own CMS, i want the script to echo 3 posts in every page, and want the script to echo from the recent post and back to the oldest post. I mean like this: For example there is totaly 30 posts; First page => posts 30-29-28 … | |
I have two tables in my database.Users table and contact table,i want to use the ID that was generated from Users table to contact table.Below is the script for Users and contact. <?php // If the values are posted, insert them into the database. if (isset($_POST['username']) && isset($_POST['password'])){ $username = … | |
I need to draw line chart for the data present in the database, my database looks like CREATE TABLE `details` ( `id` varchar(2) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `value` varchar(5) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; INSERT INTO `details` … | |
hello guys i have a problem and i beg for help, i'm doing a student IS i have a result table which store students results it is named capture 3 i have developed html form accept user who add marks for a particular student these are the hmtl code <?php … | |
Hello all, I have a question: Does anyone knows any other website besides themeforest.net to sell website? Thanks before, Davy | |
I'm trying to determine the value of $level based on the keyword user provide using If statement but whatever was the user entry the value of $level always giving as 1 this is my code I need your help to find the error <?php $q1 = $_GET['q1']; $con = mysqli_connect("localhost","FYP","123","FYP"); … | |
Parse error: syntax error, unexpected '{' in E:\FYP\DB\TWAMPd\htdocs\web\edit_infos.php on line 58 I can't update the information page . Can someone help me? <?php include('config.php'); ?> <!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"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="<?php echo $design; ?>/style.css" rel="stylesheet" title="Style" /> <style type="text/css"> … | |
Got this type of errors: Warning: mysqli_query() expects parameter 1 to be mysqli, null given in C:\OpenServer\domains\Test.loc\PHP\Shop Cart\index.php on line 7 Warning: mysqli_query() expects at least 2 parameters, 1 given in C:\OpenServer\domains\Test.loc\PHP\Shop Cart\index.php on line 8 Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in C:\OpenServer\domains\Test.loc\PHP\Shop Cart\index.php on … | |
Hi guys I am attempting to get data entered in an HTML form through PHP then converting this data into a JSON object which will be saved on a server and retrieved to the form incase someone wants to edit entries. Please help and advice on an alternative if you … | |
Hey guys, this seems to be a thorn in my side. I've been working on scraping a website which uses aspx and has eventvalidation/viewstate inputs. Every other scraping experiment I've made was not this difficult. Maybe one of you geniuses here at Daniweb has an idea of how to solve … | |
What's wrong with this? $db = new mysqli("DBserver","username","password","database"); if ($db->connect_error) { die('Connect Error ('.$db->connect_errno.')'.$db->connect_error); class registerInvitedUser { protected $formdata = array(); protected $connection; protected $execute; protected $results; protected $response_code = ""; protected $response_msg = ""; public function __construct($db) { $this->connection = $db; } $this->execute = $this->connection->query("UPDATE `users` SET acctstatus= 'A' … | |
Actually, I am having problem with the wordpress lightbox plugin: Fancybox where it don't work. Therefore, I tried to change to jquery pirobox instead. But I having problem of add the custom rel and class to the link image. I refered [URL="http://wordpress.org/support/topic/add-relxyz-to-gallery-link"]http://wordpress.org/support/topic/add-relxyz-to-gallery-link[/URL] and tried without success moreover I want to … | |
I have this code to add row to my table function addRow(tableID){ var table=document.getElementById(tableID); var rowCount=table.rows.length; var row=table.insertRow(rowCount); var colCount=table.rows[0].cells.length; var cell1=row.insertCell(0); cell1.innerHTML= rowCount+1; for(var i=0;i<colCount;i++){ var newcell=row.insertCell(i+1); newcell.innerHTML=table.rows[0].cells[i+1].innerHTML; }} and this for AJAX function function CLO() { var a=document.getElementById("keyword").value; var b=document.getElementById("chapter").value; if (a == ""&& b == "") { … | |
Hi all I'm trying to set my mysqli connection to my database as outlined in http://php.net/manual/en/mysqli.quickstart.connections.php , with one difference - I'm trying to put my connection parameters in an include file outside of my root folder, to try to secure my DB password. $mysqli = new mysqli("DBServer", "DBUsername", "DBPassword", … | |
Hello friends! I want the script when user clicks the Delete botton to delete that post, a confirm message appears and ask if the user is sure to delete that post or not, if the user clicks the cancel button, nothing happen but if clicks the ok button, then the … | |
hi:) I want the script to check the db table to see if there is the same username as what the user has submit with the register form, then stop the script from registering, but if the user has submited a new username, then registering. I think the script should … | |
Hello! I have a little problem with a For Loop, this is a For Loop in my script: $last_id = $conn->lastInsertId(); for($a = $last_id ; $a > 0 ; $a--){ code.... } But it doesn't work because of `($a = $last_id ;`, the variable $a can't be set to the … | |
I'm trying to do something like this $level=0; if($a=="x"){ $level=1; } Else{ $level=2;} How I can use the new value of $level outside the scope of IF Statement | |
Any body help me to get image name in save page I have <img> tag for image. i want this <img> name is transfer to save.php using <input type "file"> any body help me I want to get image name In <img> tag image name. my code is index.php <img … | |
I have a form which pushes data to this page: <?php session_start(); if(!isset($_SESSION['sess_user_id']) || (trim($_SESSION['sess_user_id']) == '')) { header("location: login.php"); exit(); } if($_SESSION['sess_status'] < 0){ header("location: sorry.php"); exit(); } $tz = new DateTimeZone('America/Chicago'); $age = new DateTime(filter_input(INPUT_POST, 'dob', FILTER_SANITIZE_STRING)); $checked = filter_input(INPUT_POST, 'minor', FILTER_SANITIZE_STRING); $now = new DateTime('NOW'); $y = … | |
I have page where I display thumbnails of different image albums/categories and I try to make it when user click on the thumb to open modal with all images loaded from this category. The problem is that is seems I can't understand it very well how exactly will happen this. … | |
<?php $query = mysql_query("select * from `tbl_student`"); while($data = mysql_fetch_array($query)) { $output[] = array ($data[0],$data[1],$data[2],$data[3], '<select class="form-control select1" id="'.$data[0].'"> <option 'if(----){'selected'}'>asd</option> <option >dasd</option> <option>asd</option> </select>'); } echo json_encode($output); ?> <!--here code of if() throw error--> | |
I am used codegniter 1.7.1 older version for my real estate stie and it is working fine in local host xamp server. But when i uploaded in to server, the site not working , showing error as "Fatal error: Cannot redeclare class Locale in /application/libraries/Locale.php on line 12" pls help … | |
Hy i'm having a problem with my php excell, i'm having two rows in mydb, but he export only one row from db, if i will insert the thrd row in db it will show me always two.... this is the code require_once 'Classes/PHPExcel.php'; $objPHPExcel = new PHPExcel(); // Set … | |
In my project i have a problem is: Without clicking browse button we have to get name using <input type="file"> any body help me to clear this one <img src="<?php echo $image; ?>" style="width:190px; height:150px;" /> <input type="file" name="userfile" id="userfile" value="<?php echo "Penguins.jpg"; ?>"> i am not getting the userfile | |
Hi, How to make visible directory using htaccess? am using this in my htaccess. am getting below error. Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. If you think … | |
case "remove": if(!empty($_SESSION["cart_item"])) { foreach($_SESSION["cart_item"] as $k => $v) { if($_GET["id"] == $k) { unset($_SESSION["cart_item"][$k]); } if(empty($_SESSION["cart_item"])) { unset($_SESSION["cart_item"]); } } header("location:cart.php"); } break; i m tring to delet item from session array for a shoping cart my function work ehrn i add singel value in cart but when i … |
The End.