Location: PHPKode > projects > phpBible > phpbible/admin/set_config.php
<?php

###
###
###    Copyright 2004, Danny Carlton. Permission is hereby granted to distribute 
###  copies of this software package as long as you do not charge for it, and the 
###  copyright notices remain intact. Permission is also granted to use the concepts 
###  in these scripts for other similar scripts, but you may not simply copy the scripts and claim them as your own.
###   
###


reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) 
  {
  $$key=$value;
  }

reset ($HTTP_GET_VARS);
while (list ($key, $val) = each ($HTTP_GET_VARS)) 
  {
  $$key=$value;
  }

require("../config.php");

$script_name_out='admin/admin.php';

$out_data="<?php
\$site_name='$site_name_in';
\$main_url='$main_url_in';
\$script_name='$script_name_in';
\$db_name='$db_name';
\$table_prefix='$table_prefix';
\$host='$host';
\$user='$user';
\$password='$password';
\$page_very_dark='$page_very_dark';
\$page_dark='$page_dark';
\$page_medium='$page_medium';
\$page_light='$page_light';
\$results_side='$results_side';
\$domain='$domain_in';
\$path='$path_in';
?>";

$fp = fopen("../config.php", "w");
fwrite ($fp, $out_data);
fclose ($fp);

  header("Location: $domain/$path$script_name_out"); /* Redirect browser */
  exit; 

?>
Return current item: phpBible