JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Jun 19, 2014 01:17
I know, it's such a shame - I will go back and look, thanks guys
Jun 19, 2014 01:00
ah man i dont know where to begin
Jun 19, 2014 00:54
ok
Jun 19, 2014 00:50
No worries, I will. Most importantly I just want it to display the information pulled from the database though, do you have an idea how to help me please?
Jun 19, 2014 00:47
Here

https://www.dropbox.com/s/jju1h2i6k0tbquo/cp006edit.php
Jun 19, 2014 00:43
can I link you to the orig php file ?
Jun 19, 2014 00:40
one moment...
Jun 19, 2014 00:36
When I select recipients nothing displays....
Jun 19, 2014 00:33
http://jsfiddle.net/LH3Fb/

this connects to my database
Jun 19, 2014 00:32
one moment - just putting the info in jsfiddle
Jun 19, 2014 00:26
I am having some problems with a Javascript check box not displaying all the entries pulled from a database in my PHP. Infact it doesn't display anything
Jun 19, 2014 00:24
Hi guys, how are you
Nov 20, 2013 05:45
hahahha love that xkcd cartoon
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Jun 17, 2014 17:22
thanks for help guys!
Jun 17, 2014 17:22
rookie error
Jun 17, 2014 17:22
D'oh
Jun 17, 2014 17:22
i was linking to wrong include file
Jun 17, 2014 17:22
Found the problem
Jun 17, 2014 17:14
I am not sure mate
Jun 17, 2014 17:10
and mysql which was working has now been depreciated
Jun 17, 2014 17:10
it seems to not like running insert queries
Jun 17, 2014 17:05
yep
Jun 17, 2014 17:04
Ronni I have changed the query to now say this

$con = mysqli_connect($host, $db_user, $db_password, $database);
$query2 = "INSERT INTO promodata (promo_clientname, promo_dateofcreation, promo_artist, promo_title, promo_recordlabel, promo_country, promo_catno, promo_genre, promo_expirydate, promo_description, promo_numberoftracks) VALUES('$clientsname', '$todays_date', '$thisArtist', '$thisTitle', '$thisRecordLabel', '$thisCountry', '$thisCatNo', '$thisGenre', '$expiry', '$thisDescriptionEscape', '$thisTracks')";
Jun 17, 2014 16:59
ok - 1 mo
Jun 17, 2014 16:57
bool(true)
Jun 17, 2014 16:54
i cant see the error log - it isnt displaying in logs folder, just nothing is happening
Jun 17, 2014 16:49
aww cute :)
Jun 17, 2014 16:47
the variables all display yet the query wont run
Jun 17, 2014 16:45
really frustrating me
Jun 17, 2014 16:45
I have rewritten the query and it still wont insert :(

$con = mysqli_connect($host, $db_user, $db_password);
(bool)mysqli_query($con, "USE $database");
$query2 = "INSERT INTO promodata (promo_clientname, promo_dateofcreation, promo_artist, promo_title, promo_recordlabel, promo_country, promo_catno, promo_genre, promo_expirydate, promo_description, promo_numberoftracks) VALUES('$clientsname', '$todays_date', '$thisArtist', '$thisTitle', '$thisRecordLabel', '$thisCountry', '$thisCatNo', '$thisGenre', '$expiry', '$thisDescriptionEscape', '$thisTracks')";
Jun 17, 2014 16:32
woah that's returned a whole page of globals
Jun 17, 2014 16:31
i will try it now
Jun 17, 2014 16:30
is there a better way to write this query to be called by mysqli?
Jun 17, 2014 16:30
nah i havent - this was code generated from mysql to mysqli generator
Jun 17, 2014 16:27
see when i enter everything here in phpmyadmin it inserts


INSERT INTO promodata (promo_clientname, promo_dateofcreation, promo_artist, promo_title, promo_recordlabel, promo_country, promo_catno, promo_genre, promo_expirydate, promo_description, promo_numberoftracks) VALUES('iCP Ltd', '2014-06-17 16:24:52', 'Fred', 'Funk This', 'Tekno', 'United Kingdom', 'FREDDY002', 'Techno', '2014-08-16', 'Fred is here.', '2')

Which makes me think that my code isn't calling the query properly

mysqli_query($GLOBALS["___mysqli_ston"], $query2)
Jun 17, 2014 16:26
yes
Jun 17, 2014 16:25
ah ok i'll try that
Jun 17, 2014 16:25
string(363) "INSERT INTO promodata (promo_clientname, promo_dateofcreation, promo_artist, promo_title, promo_recordlabel, promo_country, promo_catno, promo_genre, promo_expirydate, promo_description, promo_numberoftracks) VALUES('iCP Ltd', '2014-06-17 16:24:52', 'Fred', 'Funk This', 'Tekno', 'United Kingdom', 'FREDDY002', 'Techno', '2014-08-16', 'Fred is here.', '2')"

Which is the correct data but doesnt work
Jun 17, 2014 16:25
Yep it comes up this
Jun 17, 2014 16:23
forgive my ignorance but how do I do that
Jun 17, 2014 16:22
Ronni - I echoed the variables that are getting inserted with some data and

echo "<P>VARIABLE CHECK" .' - '.$clientsname.' - '.$todays_date.' - '.$thisArtist.' - '.$thisTitle.' - '.$thisRecordLabel.' - '.$thisCountry.' - '.$thisCatNo.' - '.$thisGenre.' - '.$expiry.' - '.$thisDescriptionEscape.' - '.$thisTracks;

Displays all the info correctly

VARIABLE CHECK - iCPLtd - 2014-06-17 16:20:48 - Fred - Funk This - Tekno - United Kingdom - FREDDY002 - Techno - 2014-08-16 - Fred is here. - 2

But it wont insert the info to the table
Jun 17, 2014 16:18
ronni i have read the error log and nothing comes up - i have tried echoing the information from each variable and they display on screen so I am seriously lost
Jun 17, 2014 16:05
nothing sadly inserts into promodata when similar querys insert
Jun 17, 2014 16:03
Yeah there is, I am going to work on that afterwards, just want the system to function as I am the only person to be using it
Jun 17, 2014 16:02
$query2 = "INSERT INTO promodata (promo_clientname, promo_dateofcreation, promo_artist, promo_title, promo_recordlabel, promo_country, promo_catno, promo_genre, promo_expirydate, promo_description, promo_numberoftracks) VALUES('$clientsname', '$todays_date', '$thisArtist', '$thisTitle', '$thisRecordLabel', '$thisCountry', '$thisCatNo', '$thisGenre', '$expiry', '$thisDescriptionEscape', '$thisTracks')";
mysqli_query($GLOBALS["___mysqli_ston"], $query2) or die('Error in MySQL query. Here is the error message: '.((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]
Jun 17, 2014 16:01
one mo, will reformat
Jun 17, 2014 16:01
All the variables in this worked before but since I tried converting the query to mysqli it doesn't execute and insert into the table :(

$query2 = "INSERT INTO promodata (promo_clientname, promo_dateofcreation, promo_artist, promo_title, promo_recordlabel, promo_country, promo_catno, promo_genre, promo_expirydate, promo_description, promo_numberoftracks) VALUES('$clientsname', '$todays_date', '$thisArtist', '$thisTitle', '$thisRecordLabel', '$thisCountry', '$thisCatNo', '$thisGenre', '$expiry', '$thisDescriptionEscape', '$thisTracks')";
Jun 17, 2014 15:59
Would I be able to post an example?
Jun 17, 2014 15:56
Hi guys, how are you doing. I have been having issues with PHP from converting my mysql queries to mysqli..... they aren't inserting and it's really bugging me as I can't work out whats up.
 

MySQL and relational databases

Ask your question, and then hang around a while to see if an e...
Dec 3, 2013 23:23
Hi all, anyone about?