39,326 Topics
| |
I've got a small problem. I'm working on a little package/product-list. If you're watching a Package, my website should show you which products are in there. If a product is more than one time in it, the array should be deleted and the value of the leftover array should be … | |
Why i get these errors when i open the page but when i try to upload it works fine ? <?php function upload_images() { $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); // Check if image file is a actual image or fake image … | |
Here is the deal, working on a card game using php mysql, I have a very simple way of shuffling the deck and I use array_chunk() to divide the deck into hands, the number of cards in each hand is variable depending of the numbers of players, there is also … | |
pls i have a syntax error here... i have syntax error in line2 .... <?php mysql_query("insert into $s[pr]ad_type_google_dhtml VALUES (5, 'var dhtmlwindow={\r\najaxbustcache: true, //Bust caching when fetching a file via Ajax?\r\nminimizeorder: 0,\r\ntobjects: [], //object to contain references to dhtml window divs, for cleanup purposes\r\ninit:function(t){\r\n var domwindow=document.createElement(\"div\") //create dhtml window div\r\n … | |
Hi, I am new to framwork, Now I started to learn Codeigniter. I have installed version of CodeIgniter 2.2.6, from the following link https://codeigniter.com/download I want to do a simple registration form with image upload , storing that image in a seperate folder, image name in to database, and with … | |
Hi everyone, tried to display next and previous records using Next and Previous buttons but unable to do so. The record displayed is the current record whenever i click the Next or Previous buttons ie it doesn't move to the next or previous records. Below is the coding. Please advise. … | |
http://www.w3schools.com/php/php_forms.asp On the page above I read that GET variables are send via the url and POST variables are sent as an HTTP request. When I tried POST with a simple php script all of my POST variables were still in the URL which is what I was expecting for … | |
I want to show all data of the page in pdf but i have no idea how to do this . I am using php .Please help me to solve that problem. | |
what is the difference between client-side programming language and server-side programming language? Why javascript is only a client-side programming language, but PHP is a server-side programming language? I am a newbie starting web development and need some advice. | |
i have following code first insert is working properly and data in to database but second insert query which depends on last_insert_id() fails.I have tried to find out mistake but failed to do so? <?php namespace Solutions\File; class AddUserData { function __construct($DB_con) { $this->db = $DB_con; } public function insert_detail($productDetails){ … | |
I have a working search database and it's query code says $criteria = $_POST['criteria']; $query = "SELECT * FROM table WHERE field LIKE '%".$criteria."%' Order by Appeared asc"; but I want it to omit results that contain the word but are more then the word example the criteria might be … | |
Alo All, I am really really tired of searching for a simple file manager for PHP/Code Igniter. I am not looking for advanced one at all: 1. No MYSQL 2. NO user tracking 3. Basic File Operations (copy, move etc) 4. Multi upload (in anyway) I have tried fileman and … | |
$mysql_hostname = "localhost"; $mysql_user = "root"; $mysql_password = ""; $mysql_database = "loan"; $connect = mysql_connect($mysql_hostname, $mysql_user, $mysql_password) or die("Something went wrong..."); mysql_select_db($mysql_database, $connect) or die("Something went wrong..."); if(isset($_POST['btn_submit'])) { $datess = $_POST['datess']; $control = $_POST['control']; $payee = $_POST['payee']; if(!empty($datess) && !empty($control) && !empty($payee)) { mysql_query("INSERT INTO `sales`(`datess`, `control`, `payee`) VALUES … | |
Hi guys, I try to calculate number of month between 2 selected dates and i just got this code. The problem is this code calculate number of days and i try change the code from **var days = (end - start) / (1000 * 60 * 60 *24) ;** to … | |
Usually I am very conservative about upgrading in production even partial. But the moto “PHP 7 is not an evolution is a revolution” made me want to try it also in production in just one specific folder that serves few sites. Here are my first two observations about things that … | |
HI, In a page I load table in while loop with time duration calculation for multiple times. I want to display time difference in their respective rows. Here I included my code. <?php $a = mysql_query("SELECT * FROM user")or die(mysql_error()); $a_count = mysql_num_rows($a); if($a_count > 0) { ?> <table border="1" … | |
I followed this site -> https://www.box.com/blog/how-to-debug-php-with-vim-and-xdebug-on-linux/ but I'm not having much luck. I followed the firections and my phpinfo() functions is showing that xdebug is up and running but I see don evidence of xdebug from within vim. I typed in my localhost url, localhost/mysite.php?XDEBUG_SESSION_START=1 and then wen to vim … | |
Just started learning codigniter and as far I learned from tutorials and by reading documentation I got and idea a basic about how to develop websites using codigniter as far as we see by using MVC framework there are many advantages so my questions is let suppose if we start … | |
hi im following a tutorial and when i went to test the login i press login but nothing happens can anyone check the code as i cant se whats up with the form <?php session_start(); include("includes/database.php"); if(isset($_POST['login'])) { $email = mysqli_real_escape_string($con,$_POST['email']); $pass = mysqli_real_escape_string($con,$_POST['pass']); $get_user = "SELECT * FROM users … | |
This question is about querying an XML file. The file structure is below: Inline Code Example Here <?xml version="1.0" encoding="UTF-8"?> <descriptions> <image> <name>run.jpg</name> <text>Running around the lake</text> </image> <image> <name>sail.jpg</name> <text>Sailing around the lake</text> </image> <image> <name>track.jpg</name> <text>Tracking up the mountain</text> </image> ... <image> <name>Steven.jpg</name> <text>Steven Bullon is a photographer</text> … | |
I am doing a start up and am figuring out my stack. I've been using php for around 5 years now and am extremely familiar with it. However, I've recently been introduced to node.js and have seen it is on the rise. I'm not sure what to use for server … | |
HI im getting the following error Warning: Invalid argument supplied for foreach() in /home/jktempla/public_html/includes/class-query.php on line 106 in the following bit of coding can anyone see whats happening public function do_user_directory() { $users = $this->load_all_user_objects(); foreach ( $users as $user ) { ?> <div class="directory_item"> <h3><a href="/social/profile-view.php?uid=<?php echo $user->ID; ?>"><?php … | |
I have a strange problem here is code snippet for form having bootstrap tab when after filling all form fields i submit the form no error or form fileds are posted,there is something wrong with my html however my validations and other backend code is working for other form but … | |
When I login same script works for first user but for other user, it gives error in connection. More over i want to fetch data from database Main File is <?php include_once("../init.php"); validation_check($_SESSION['SID'],MEM_HOME_ADMIN); $msg=''; $dir ='../'.USER_PIC; $sId = $_SESSION['SID']; $query = mysql_query("select * from user WHERE user = ".$sId) or … | |
Please, I need help to echo atable row and div tag within PHP code. The following is what I have unsuccessfully tried: echo '<tr>' '<td style="text-align:left">' . '<div class="describe">' . $row['im_description'] . '</div>' . '</td>' '</tr>'; I don't want it to appear in this format: <tr> <td style="text-align:left"><div class="describe"><?php echo … | |
can anyone give me php email template??, i have form ready and the fields name are as shown below: Name: Email: Phone: Subject: Message: pls help me i have email template design you just give me php code that shows that template in email | |
Hi all, I need to add a contact form to a site I'm working on. I'm just thinking whether it would be better to go with an online solution (grab a form from somewhere and use it on my site) or building my own thing (complete with captcha etc). I'm … | |
<?php if (isset ($_POST['submit'])) { try { $picture = "../images/default-picsss.png"; $sql = " INSERT INTO user (username, password, fullname, address, mobile, email, picture) VALUES (:username, :password, :fullname, :address, :mobile, :email, :picture ); INSERT INTO user_balance (username) VALUE (:username); "; $stmt = $PDO->prepare($sql); $stmt->bindParam(':username', $_POST['username'], PDO::PARAM_STR); $stmt->bindParam(':password', $_POST['password'], PDO::PARAM_STR); $stmt->bindParam(':fullname', $_POST['fullname'], … | |
Hi, i have a code in my cgi script for replace text(for example replace red ro blue) $STR_SEARCH='red' $STR_REPLACE='blue' this work fine.but when i want use gzip for compression,gzip will not work but when i disable the replace,gzip will be work fine. please help me ,that how i can enable … |
The End.