Skip to content

Instantly share code, notes, and snippets.

@arschmitz
Created March 8, 2011 20:10
Show Gist options
  • Save arschmitz/860928 to your computer and use it in GitHub Desktop.
Save arschmitz/860928 to your computer and use it in GitHub Desktop.
<?php
require($_SERVER['DOCUMENT_ROOT']."/includes/dbconnect.php");
foreach($_POST as $name => $value){
$$name = $value;
echo $name."=".$value;
}
$sql = "INSERT INTO text_service (cust, phone, first, carrier, last) VALUES ('$cust','$phone','$first','$carrier','$last')";
$db->query($sql);
echo $sql;
?>
@arschmitz
Copy link
Author

output:
first=dfgh
last=dfgh
phone=fgdh
cust=dfgh
ignore=Add
carrier=teleflip.com
INSERT INTO text_service (cust, phone, first, carrier, last) VALUES ('dfgh','fgdh','dfgh','teleflip.com','dfgh')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment