misslilbit02 Posted August 20, 2007 Share Posted August 20, 2007 Hi, I have a question that I need help with...I have data coming across the URL from an outside source and I I don't know what the $_POST values are. Is there a way for me to get the information and put it into the database without knowing the values being past across the browser and if so how would I go about doing that? I know you would have mssql_query("INSERT INTO DATABASE_TABLE(column1, column2, coulmn3) VALUES (value1, value2, value3)"); I know how to get the data through a loop but my confusion comes in where you input the values into the database. Without knowing the data how would you insert the values into the database? Quote Link to comment https://forums.phpfreaks.com/topic/65808-anonymous-data-in-php/ Share on other sites More sharing options...
php_tom Posted August 20, 2007 Share Posted August 20, 2007 <?php for($i=0;$<count($_POST);$i++) { if($_POST[$i] != NULL && $_POST[$i] != "") { // Do whatever you want with this piece of info... } } ?> Is that what you have in mind? Hope it helps. Quote Link to comment https://forums.phpfreaks.com/topic/65808-anonymous-data-in-php/#findComment-328796 Share on other sites More sharing options...
MadTechie Posted August 20, 2007 Share Posted August 20, 2007 or.. foreach($_POST as $Key => $Value) { echo "Key:$Key => Value:$Value"; } Quote Link to comment https://forums.phpfreaks.com/topic/65808-anonymous-data-in-php/#findComment-328797 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.