39,326 Topics

Member Avatar for
Member Avatar for AntonyRayan

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) { …

Member Avatar for AntonyRayan
0
116
Member Avatar for James_43

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 …

Member Avatar for jkon
0
617
Member Avatar for gtel
Member Avatar for diafol
0
148
Member Avatar for LibraryCode

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. …

Member Avatar for LibraryCode
0
340
Member Avatar for James_43

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 …

Member Avatar for James_43
0
296
Member Avatar for Icemission

[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 …

Member Avatar for eeegeg
0
913
Member Avatar for shany0786

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']= …

Member Avatar for shany0786
0
356
Member Avatar for LibraryCode

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" …

Member Avatar for jkon
0
9K
Member Avatar for jeffersonalomia

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 :)

Member Avatar for jeffersonalomia
0
344
Member Avatar for SirMahlon

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

Member Avatar for diafol
0
184
Member Avatar for jalpesh_007

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

Member Avatar for diafol
0
142
Member Avatar for WebMedia_1

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 …

Member Avatar for diafol
-1
443
Member Avatar for James_43

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); …

Member Avatar for James_43
0
222
Member Avatar for Ventech_IT

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 …

Member Avatar for diafol
0
306
Member Avatar for WebMedia_1

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"> …

Member Avatar for WebMedia_1
0
491
Member Avatar for blueguy777

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 …

Member Avatar for diafol
0
393
Member Avatar for UK-1991

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 …

Member Avatar for cereal
0
265
Member Avatar for praba_web

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( …

Member Avatar for pritaeas
0
438
Member Avatar for amita_1

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 …

Member Avatar for WebHostingUAE
0
2K
Member Avatar for blueguy777

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 = …

Member Avatar for jkon
0
407
Member Avatar for james sipha
Member Avatar for diafol
-1
107
Member Avatar for bLuEmEzzy

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 …

Member Avatar for bLuEmEzzy
0
1K
Member Avatar for patrick1981

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, …

Member Avatar for rukverc
0
17K
Member Avatar for yaginuk

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 …

Member Avatar for yaginuk
0
185
Member Avatar for James_43

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` …

Member Avatar for James_43
0
4K
Member Avatar for anmol.raghuvanshi1

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 …

Member Avatar for cereal
0
812
Member Avatar for James_43

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) …

Member Avatar for James_43
0
493
Member Avatar for jkon

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 …

Member Avatar for jkon
4
2K
Member Avatar for shany0786

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 …

Member Avatar for shany0786
0
390
Member Avatar for ribrahim

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 …

Member Avatar for diafol
0
270

The End.