PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Okay here is what I am trying to do. I have an array that currently have each player and thier different attributes (name, position, height, from, dob, teamname) Right now I can print the key name for it, and what it is for every person using the echo $keys[$j] line. The problem is that I want to enter it into the database. I am printing out what my sql statement is, and it is giving me insert values of array or array[0] no matter what I do. I am still new at php so I am not sure what I am doing wrong. Can someone show me what I should be putting into the arrays that I marked with quesitons (????) I have been working on this for awhile, and finally decided I just need some help. Thanks in advance.
Thanks I got it to work now. It wouldn't work with the ['name'] stuff but I put the periods around what I thought it might be and it works now. Could you tell me exactly what teh periods are doing here? I know you can use them to add sttuf to the beginning and end, jsut not sure what they do here.
The period "." is a string concatenation device. Basically it acts as an adder when putting things together in PHP. In your INSERT query I used them because the data coming from the array could be a string or an integer. MySQL doesn't take too kindly to inserting string data types without a single quote " ' " surrounding the data, hence the format I was using...