Jump to content

best way to use php with mysql


GreatDays

Recommended Posts

Trying to figure out how to do a dynamic update when the user changes the data on my web page's

form.  Pretty new to php here, but lots of experience with programming.

 

My web server host (1and1 hosting) provides mysql support, so with the database I've created, 1and1

requires I use PHP to access the mysql database.

 

But from what I understand,  any php code gets preprocessed and converted to html

before the page loads.  So if the user changes the input data on my form, how the

heck do I follow my web server host's requirement that I make php calls to send the new

user data dynamically to the mysql database? 

Link to comment
https://forums.phpfreaks.com/topic/233599-best-way-to-use-php-with-mysql/
Share on other sites

Okay, I forgot the most important part, this is written in Javascript, ie.

I'm using javascript for the user-input form on my web page.

 

I have read about using php to access the mysql database and have

successfully embedded php code withing the php script tags <?php

and ?> in my javascript -- but when nothing happened it became clear that all php

runs before the page loads.

 

So here I am needing to read/write to my MySQL database from

my Javascript code, and 1and1 is telling "you have to use php

to access the database."

 

So what am I missing?  Is there something about javascript (and

using php) that allows dynamic mysql database calls?

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.