Skip to content

Instantly share code, notes, and snippets.

@jamsesso
Created November 9, 2009 00:32
Show Gist options
  • Save jamsesso/229574 to your computer and use it in GitHub Desktop.
Save jamsesso/229574 to your computer and use it in GitHub Desktop.
$sql = fopen("installation.sql", "r");
$new_sql = str_replace("{PREFIX}", $_POST['prefix'], $sql);
$new_sql = str_replace("{USERNAME}", $post['username'], $sql);
$new_sql = str_replace("{PASSWORD}", $post['password'], $sql);
$new_sql = str_replace("{EMAIL}", $post['email'], $sql);
$new_sql = str_replace("{IPADDR}", $post['ipaddr'], $sql);
$new_sql = str_replace("{BLOGTITLE}", $post['title'], $sql);
$new_sql = str_replace("{BLOGKEYWORDS}", $post['keywords'], $sql);
$new_sql = str_replace("{BLOGDESCRIPTION}", $post['description'], $sql);
$new_sql = str_replace("{BLOGURL}", $post['root'], $sql);
$new_sql = str_replace("{DATE}", $post['joined'], $sql);
$new_sql = str_replace("{WEBSITE}", $post['website'], $sql);
$new_sql = str_replace("{LIME}", $post['lime'], $sql);
$new_sql = str_replace("{GRAVATAR}", $post['gravatar'], $sql);
$db->query($new_sql) or die($db->error());
fclose($sql);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment