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!
Is there a way to make javascript be built on the fly with php and mysql. I have a bid program I made for my store and i had to hard code in the javascript like
Now on this one the id[1] would be an array out of all the entries for that one. 15 is the mysql id row and 84 is the price. right now the price is all java but the descriptions and the rest of the information is all through php/mysql. Would be much nicer to update prices via web interface than though updating my java script code every time.
Just to be technical - you are not actually switching between PHP and JS, instead you are using PHP to echo out the JS which means you can use PHP to determine what variables are given to the JS.
I looked at what I did before and it was different. This way works great. before I was trying to echo out the variable inside the javascirpt(It dont work ) but echoing everything works.
Although after I got it all transformed this time my prices were not calculating. After printing off 11 sheets of code I found my problem. I had JavScript, deleted the A on accident hehehe.
Anyway all is working great and I built myself a webinterface to handle all the products and even add some. Thanks for the help.