PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
May 6, 2013 20:39
whatever the free ssl place is. Later guys!
May 6, 2013 20:38
wait no
May 6, 2013 20:38
hey I got a signed cert from SSLstart but no one supports it what a rip (its free)
May 6, 2013 20:35
so wait there's no girls here OH GOD sad day... sad sad day...
May 6, 2013 20:33
lol
May 6, 2013 20:31
gotta treat php like your girlfriend / wife, and embrace the quirky ways it handles dangling pointers
May 6, 2013 20:30
you win a prize @bwoebi
May 6, 2013 20:28
define(TEST, 'is this a bug?');
May 6, 2013 20:26
Stop trying to change PHP and embrace its quirks. You will never live a happy life otherwise. :)
4
May 6, 2013 20:22
its bits all the way down...
May 6, 2013 20:20
POINTER get it?
May 6, 2013 20:20
whats your POINT hehe...
May 6, 2013 20:19
@bwoebi are you calling it a function pointer? I thought ircmaxell is saying its not a function pointer? I don't follow.
May 6, 2013 20:17
sure ircmaxell, you can add to a pointer to change its memory address
May 6, 2013 20:15
a function pointer is just a memory address until its called so whats your point
May 6, 2013 20:13
"first class function" then.
May 6, 2013 20:11
too add to your string handling chit chat
May 6, 2013 20:10
anyone know that PHP supports function pointers? function foo() { echo "hello world"; } $func = "foo"; $func(); HURRAY!
May 6, 2013 20:04
if you dont want that to happen
May 6, 2013 20:04
if(isset($_POST['addfixture2'])){
May 6, 2013 20:04
it needs to be contained in something like you have below:
May 6, 2013 20:04
also each time you refresh the page a row is inserted. Even just viewing the page
May 6, 2013 20:04
$player_position and $name should be user input values you get from $_POST['name'] etc
May 6, 2013 20:03
$sql_teamselection="INSERT INTO
team_selection
(user_id, player_position, player_name)
VALUES('$id_last','$player_position','$name')";
May 6, 2013 20:00
@humphrey not sure if I fully understand you. Anyways the code looks incorrect. You do an insert after looping through a result set. So you will insert the value of the last row in your result set. I think you want to insert after a form is submitted, not after printing a select box. Do you follow?
May 6, 2013 19:57
Im not sure how php deals with that. Maybe its not an error, but remove the "("s
May 6, 2013 19:57
$res_selection= mysql_query($player_selection );
May 6, 2013 19:56
heres an interesting tidbit: $player_selection = ("select
player_id, name, surname, position, user_id
from
players");
May 6, 2013 19:56
@humphrey lol your coding makes my eyes hurt man WHY?????
May 6, 2013 19:56
@hum
May 6, 2013 19:52
I write all my web apps in C, then use exec($_GET['page_name']) in php to call my program for added secuirty
May 6, 2013 19:49
php is the most perfect secure language ever. It's been proven by German mathematicians and confirmed by Stephen Hawking.
May 6, 2013 19:48
@humphrey use something like pastebin and we can take a look
May 6, 2013 19:46
"61" === 61 (false)
May 6, 2013 19:45
@humphrey I don't think you have given enough code the variables you have plugged in I don't see them being set.
May 6, 2013 19:43
o wait never mind... :S
May 6, 2013 19:43
@humphrey
May 6, 2013 19:43
Your insert query should use double quotes instead of single quotes
May 6, 2013 19:40
wall of code! YAY!!!!
 

MySQL and relational databases

Ask your question, and then hang around a while to see if an e...
May 3, 2013 13:46
or: echo $query;
May 3, 2013 13:45
while ( $mssqlRow = mssql_fetch_array($mssqlResult) ) { print_r($mssqlRow); }
May 3, 2013 13:44
woohoo!
May 3, 2013 13:43
no whitespace there so syntax error I think thats your issue
May 3, 2013 13:42
yes
May 3, 2013 13:42
if you reconstruct that string you will see a query with no newline or spaces
May 3, 2013 13:42
yeah but now that I expand your comment none of them have spaces
May 3, 2013 13:39
see my previous comment
May 3, 2013 13:37
@user1206585
May 3, 2013 13:37
@u
May 3, 2013 13:37
the query above fails because there is no space before "FROM" word