Briant142 Posted July 21, 2006 Share Posted July 21, 2006 I have created a webpage to accept live feed of data by vendor "posting" the data to my url using the following code[code]$input = array();$input['email'] = $_POST['email'];$input['source'] = $_POST['source'];$input['ts'] = $_POST['ts'];$input['ip'] = $_POST['ip'];[/code]I have created a database and a table. How do I reference the database and table in my website to store the data posted to the database I have created? Link to comment https://forums.phpfreaks.com/topic/15216-live-data-feed/ Share on other sites More sharing options...
trq Posted July 21, 2006 Share Posted July 21, 2006 You connect to your database using [url=http://php.net/mysql_connect]mysql_connect[/url](). You then reference the table using sql (structured query language), nothing to do with php really. Link to comment https://forums.phpfreaks.com/topic/15216-live-data-feed/#findComment-61497 Share on other sites More sharing options...
Briant142 Posted July 21, 2006 Author Share Posted July 21, 2006 the mysql_connect() should be in the index.php before $input = array();$input['email'] = $_POST['email'];$input['source'] = $_POST['source'];$input['ts'] = $_POST['ts'];$input['ip'] = $_POST['ip']; Link to comment https://forums.phpfreaks.com/topic/15216-live-data-feed/#findComment-61499 Share on other sites More sharing options...
Briant142 Posted July 21, 2006 Author Share Posted July 21, 2006 where do I insert mysql_connect() to attach to my dbase? Do I insert it in the index.php? Link to comment https://forums.phpfreaks.com/topic/15216-live-data-feed/#findComment-61913 Share on other sites More sharing options...
ryanlwh Posted July 22, 2006 Share Posted July 22, 2006 you insert the mysql code whenever you need it. if you're doing this processing in process.php, insert the connection there. you may find it helpful to have this connection code saved in a separated file, then include this file when needed. Link to comment https://forums.phpfreaks.com/topic/15216-live-data-feed/#findComment-61915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.