39,393 Topics

Member Avatar for
Member Avatar for LibraryCode

Hi,i have the following code,how can i count values -averages per row and column from this code: <?php $data = array( array(""=>"January", "ATL"=>rand(0,335) , "ORD"=>rand(0,335),"LAX"=>rand(0,335),"DFW"=>rand(0,335),"DEN"=>rand(0,335),"JFK"=>rand(0,335),"SFO"=>rand(0,335),"CLT"=>rand(0,335),"LAS"=>rand(0,335),"PHX"=>rand(0,335)), array(""=>"February", "ATL"=>rand(0,335) , "ORD"=>rand(0,335),"LAX"=>rand(0,335),"DFW"=>rand(0,335),"DEN"=>rand(0,335),"JFK"=>rand(0,335),"SFO"=>rand(0,335),"CLT"=>rand(0,335),"LAS"=>rand(0,335),"PHX"=>rand(0,335)), array(""=>"March", "ATL"=>rand(0,335) , "ORD"=>rand(0,335),"LAX"=>rand(0,335),"DFW"=>rand(0,335),"DEN"=>rand(0,335),"JFK"=>rand(0,335),"SFO"=>rand(0,335),"CLT"=>rand(0,335),"LAS"=>rand(0,335),"PHX"=>rand(0,335)), array(""=>"April", "ATL"=>rand(0,335) , "ORD"=>rand(0,335),"LAX"=>rand(0,335),"DFW"=>rand(0,335),"DEN"=>rand(0,335),"JFK"=>rand(0,335),"SFO"=>rand(0,335),"CLT"=>rand(0,335),"LAS"=>rand(0,335),"PHX"=>rand(0,335)), array(""=>"May", "ATL"=>rand(0,335) , "ORD"=>rand(0,335),"LAX"=>rand(0,335),"DFW"=>rand(0,335),"DEN"=>rand(0,335),"JFK"=>rand(0,335),"SFO"=>rand(0,335),"CLT"=>rand(0,335),"LAS"=>rand(0,335),"PHX"=>rand(0,335)), array(""=>"June", "ATL"=>rand(0,335) , "ORD"=>rand(0,335),"LAX"=>rand(0,335),"DFW"=>rand(0,335),"DEN"=>rand(0,335),"JFK"=>rand(0,335),"SFO"=>rand(0,335),"CLT"=>rand(0,335),"LAS"=>rand(0,335),"PHX"=>rand(0,335)), array(""=>"July", "ATL"=>rand(0,335) , "ORD"=>rand(0,335),"LAX"=>rand(0,335),"DFW"=>rand(0,335),"DEN"=>rand(0,335),"JFK"=>rand(0,335),"SFO"=>rand(0,335),"CLT"=>rand(0,335),"LAS"=>rand(0,335),"PHX"=>rand(0,335)), array(""=>"August", …

Member Avatar for diafol
0
358
Member Avatar for gogs85

How to make popup login and register from index.php to work and to parse data in mysql I have: Index.php, login.php, register.php In index.php I have modal popup and I want to user can login and register from popup. I try with ajax but not working. Here is my code: …

0
112
Member Avatar for UK-1991

Hello, I tried to created a social networking system in which I created a part of adding friends so the problem I am having if the firend is not in his are like he searched a friend normally so that friend is not in his system so it show as …

Member Avatar for pritaeas
0
360
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
118
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
619
Member Avatar for gtel
Member Avatar for diafol
0
151
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
343
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
301
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
923
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
361
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
349
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
187
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
145
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
444
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
223
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
310
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
493
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
394
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
266
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
444
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
408
Member Avatar for james sipha
Member Avatar for diafol
-1
109
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
187
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
815
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
496

The End.