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?
Anonymous Data in PHP
Moderator: General Moderators
If your values come from the URL then you need the $_GET collection (ASP style sentence
). You do not know the values - this is why variables are used so you never know the exact value which comes. maybe you do not know the variable names. There should be some rule for that, finding it will help you saving the data in database.
You can post examples here and get some help.
You can post examples here and get some help.
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Don't forget the syntax for foreach can be...
Code: Select all
foreach ($_POST as $key=>$value) {
//key will be the index/varname
//value will be well ...the value
}