39,326 Topics
| |
Focus not working. What is the error in my code Dynamic Textbox Code: select query $i =1; while() { <input type="text" name="class_teacher_entry[]" id="class_teacher_entry<?php echo $i; ?>" class='marks' size="5" maxlength="3" onkeypress="return onlyNumbers(event);" onblur="markValidation(this.value,document.getElementById('marktotal').value,<?php echo $i; ?>);"/> } <Script> function markValidation(a,b,i) { var c = parseInt(a); var d = parseInt(b); if(c>d) { … | |
Here's a fun one... How would you solve a basic simultanous equation with PHP? I have an array with a range [high,low] of [378,395] and I want to normalise the data in that array between the values of [-1, 1]. From that, using `x => ax + b`you get the … | |
The website has to connect to internet time, instead of the local time via computer. Any ideas? | |
Would be really appreciated your help.I have a code like this: i need to display a total figure for passengers carried on each route and in each month and highlight in green the best performing route and highlight in red the worst performing route.I constraced those tables and now stack. … | |
Hi all, I am using a for statement to generate lots of arrays, example: Array ( [0] => 2 [1] => 395.0 [2] => 0.33 ) Array ( [0] => 3 [1] => 394.0 [2] => 0.81 ) But, I want to have them all within 1 array, example: Array … | |
[CODE]<?php // CONFIGURATION ****************************************************************************** $dbHost = "Example.com"; // MySQL host $dbUser = "shen"; // MySQL username $dbPass = "XXXXXXX"; // MySQL password $dbDatabase = "shen_080892"; // MySQL database name $username = "shen08089296"; // Login Username $password = "XXXXXX"; // Login Password $logspage = 100; // Number of logs per page … | |
I am uploading max 5 images and i want to create the thumbnails of those 5 images i am successful in uploading and saving image name in database but can't able to make thumbnails. //controller $files = $_FILES; $cpt = count($_FILES['uploadfile']['name']); for($i=0; $i<$cpt; $i++) { $_FILES['uploadfile']['name']= $files['uploadfile']['name'][$i]; $_FILES['uploadfile']['type']= $files['uploadfile']['type'][$i]; $_FILES['uploadfile']['tmp_name']= … | |
Dear friends,help me please,i have a php array,how would i display table out of it,something went wrong : <?php $data = array( array ( "Hartsfield Jackson Atlanta International","Atlanta" , "ATL" ), array ( "Chicago O'Hare International", " Chicago", " ORD" ), array ("Los Angeles International", " Los Angeles", " LAX" … | |
I want to upload file using php ajax then insert all the data such as chapter name, lesson name and id on database. How can i do that? pls help me guys. Thank you :) | |
i have a value from my database. i want to select the most highest value and split it into say ten. then echo it in my select.Any help pls | |
Hello all, How can i import my mysql table data to google spreadsheet? Also i want to add data in spreadsheet from particular cell. i have referred following web pages, but i can't get much idea. https://support.google.com/docs/answer/40608?hl=en http://www.ibm.com/developerworks/library/x-googledata2/ please help me. Thanks | |
Hi guy for part of my school final project, pls i need a script to restrict user from clicking a web page session and redirect them to login with alert of 5 seconds. Let me explain it very well, there is a school project im working on now that has … | |
I am using a mySQL query in PHP to pull content from rows into an array. A simple for statement is then displaying this data: for ($i = 0; $i < ($num_rows); $i++): //Find Author Name $query = 'SELECT firstname, lastname FROM vd_users WHERE id = ?'; $statement = $mySQL_con->prepare($query); … | |
Hi Guys and Gals, Im busy developing a small website for a client but i've hit a little snag, currently when i create a new "property" entry i can upload one picture with it that kind of defeats the purpose because i need to showcase the "property". how would I … | |
hi guys pls i need your help, im having some problem to add to cart from a search strings in php with the following code, what i want is if i search for flight and the result and i want to add the result to cart <div class="col-md-9"> <ul class="booking-list"> … | |
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 … | |
Hello, I have created many functions and I am trying to show messages ie when user successfully registered invalid username password invalid this and that I tried to do so using the session_start concept please let me know if this is a good approach or should i do another way … | |
Hi there, How to get near by locations (around 5km) using latitude and longitude? even i got sql query : my table structure: `craete table ad_list(ad_list_id int(11) NOT NULL, lat decimal(10,6) NOT NULL, lng decimal(10,6) NOT NULL, PRIMARY KEY(`ad_list_id`));` SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( … | |
I want to restart Apache when I change configuration file on a web application which is I need to create a php file for restarting Apache but I dont want to give a permission to user apache in /etc/sudoers Can someone explain intensively to me ? Don't see this is … | |
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 = … | |
Hi Guys I need help. I have a table and when I clicked the table row(PID 1 below) Ill get the info of the row 1(PID) and pass it on the other form(form2). Thank You in advance. pid prno 1 one 2 two this is my code in loading the … | |
Hi all, I have a table for users in a mysql database. table_users -id -firstname -lastname -email -password -enabled When I select and display records from the table, I want to add and enable/disable toggle button to the enabled field so that if its enabled and I click on it, … | |
Hi, i bought a framework website which i am altering for a client and i am trying to add a new feature to it. i have added new field to mysql table i have added lines of code to show up on form, the choice in new feature will be … | |
Hi all, I have a multi-dimensional array. Using a **for** function, I would like to display the information inside the array. This means using a variable $i for the first index of the array, which I think is causing the problem. I am getting the error message: `Undefined offset: 2` … | |
| Ok , i just have doubt and need suggestions for this.I have multistep form.What i am doing now that i am saving step-1 and step-2 data in session and in the last when user clicks on register all data saved in sessions will passed to database and inserted there.Now i … |
Hi there, I am trying to populate a page with multiple rows from a mySQL database. To grab the data, I am using: for ($i=1; $i < 5; $i++) { $query = 'SELECT * FROM table WHERE column = ?'; $statement = $mySQL_con->prepare($query); try { $statement->execute(array($i)); } catch (PDOException $error) … | |
A simple Data Layer for OOP PHP Applications Hello, first of all to understand this tutorial would be best if you have some knowledges about OOP ( https://www.daniweb.com/programming/web-development/tutorials/437592/introduction-to-phps-object-orientation by priteas ) and DB usage (MySQL in this case) with PHP https://www.daniweb.com/programming/web-development/threads/499320/common-issues-with-mysql-and-php by diafol ). What we will try to achieve … | |
This may appear as child problem but i have confusion about this When we document Root what this means?? I am creating directory strucure for framework eg this is directory structure from code tutsplus `----public Document root where public files are accessed -css -images -content -js ------ Resources -library -template … | |
Dear Member, I'm using MYSQL 5.6 and have 3 tables: 1. Customers (Cutomer_id, Customer_Name) 2. Order1 (Order_Id1, Customer_id) 3. Order2 (Order_Id2, Customer_id) I need to write a query to count the number rows from Order1 and Order2 group by Customer_Id. The result should be like: Customer_Id Customer_Name Number of Orders … |
The End.