Posted By

cerxx on 09/15/18


Tagged

wp


Versions (?)

wp-change-domain


 / Published in: PHP
 

URL: https://github.com/Helsingin-kaupungin-tietokeskus/wordpress/blob/master/wp-change-domain.php

Before moving on to the site migration, make sure that the new domain is parked for hosting. To do this simply: go to your new domain and if a message appears that the site has not been launched yet, then everything is fine. If nothing will open at all, then you incorrectly rewrote the NS of the domain server (changing the NS servers takes from 4 to 24 hours), or forgot to add (park) the new domain to the hosting. If the domain is successfully parked, then follow the instructions:

We will move all the files from the old site to the new one to the folder where the site should be located (via FTP / hosting control panel); We go to the old hosting and dump the database (export, via phpMyAdmin); We pass to a new hosting, we fill our database (import, via phpMyAdmin); We configure the connection to the new database (file wp-config.php); Upload the file change-domain.php, unpack it and upload it to our new domain in the root folder; In the browser, go to the link http: //vash_site/change-domain.php (make sure the connection to the database is correct); We check the correctness of entering the domain names and click the "Change" button. You do not need to close the page. If everything was done correctly, then the site should be launched and all links should be rewritten to new ones.

  1. <?php
  2. /**
  3.  * Author: Daniel Doezema
  4.  * Author URI: http://dan.doezema.com
  5.  * Version: 0.2 (Beta)
  6.  * Description: This script was developed to help ease migration of WordPress sites from one domain to another.
  7.  *
  8.  * Copyright (c) 2010, Daniel Doezema
  9.  * All rights reserved.
  10.  *
  11.  * Redistribution and use in source and binary forms, with or without
  12.  * modification, are permitted provided that the following conditions are met:
  13.  *
  14.  * * Redistributions of source code must retain the above copyright
  15.  * notice, this list of conditions and the following disclaimer.
  16.  * * Redistributions in binary form must reproduce the above copyright
  17.  * notice, this list of conditions and the following disclaimer in the
  18.  * documentation and/or other materials provided with the distribution.
  19.  * * The names of the contributors and/or copyright holder may not be
  20.  * used to endorse or promote products derived from this software without
  21.  * specific prior written permission.
  22.  *
  23.  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  24.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  25.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26.  * DISCLAIMED. IN NO EVENT SHALL DANIEL DOEZEMA BE LIABLE FOR ANY
  27.  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  28.  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  29.  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  30.  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32.  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33.  *
  34.  * @copyright Copyright (c) 2010 Daniel Doezema. (http://dan.doezema.com)
  35.  * @license http://dan.doezema.com/licenses/new-bsd New BSD License
  36.  */
  37. /* == CONFIG ======================================================= */
  38. // Authentication Password
  39. define('DDWPDC_PASSWORD', 'asd');
  40. // Cookie: Name: Authentication
  41. define('DDWPDC_COOKIE_NAME_AUTH', 'DDWPDC_COOKIE_AUTH');
  42. // Cookie: Name: Expiration
  43. define('DDWPDC_COOKIE_NAME_EXPIRE', 'DDWPDC_COOKIE_EXPIRE');
  44. // Cookie: Timeout (Default: 5 minutes)
  45. define('DDWPDC_COOKIE_LIFETIME', 60 * 5);
  46. /* == NAMESPACE CLASS ============================================== */
  47. class DDWordPressDomainChanger {
  48. /**
  49.   * Actions that occurred during request.
  50.   *
  51.   * @var array
  52.   */
  53. public $actions = array();
  54. /**
  55.   * Notices that occurred during request.
  56.   *
  57.   * @var array
  58.   */
  59. public $notices = array();
  60. /**
  61.   * Errors that occurred during request.
  62.   *
  63.   * @var array
  64.   */
  65. public $errors = array();
  66. /**
  67.   * File contents of the wp-config.php file.
  68.   *
  69.   * @var string
  70.   */
  71. private $config = '';
  72. /**
  73.   * Class Constructor
  74.   *
  75.   * @return void
  76.   */
  77. public function __construct() {
  78. $this->loadConfigFile();
  79. }
  80. /**
  81.   * Gets a constant's value from the wp-config.php file (if loaded).
  82.   *
  83.   * @return mixed; false if not found.
  84.   */
  85. public function getConfigConstant($constant) {
  86. if($this->isConfigLoaded()) {
  87. preg_match("!define\('".$constant."',[^']*'(.+?)'\);!", $this->config, $matches);
  88. return (isset($matches[1])) ? $matches[1] : false;
  89. }
  90. return false;
  91. }
  92.  
  93. /**
  94.   * Gets $table_prefix value from the wp-config.php file (if loaded).
  95.   *
  96.   * @return string;
  97.   */
  98. public function getConfigTablePrefix() {
  99. if($this->isConfigLoaded()) {
  100. preg_match("!table_prefix[^=]*=[^']*'(.+?)';!", $this->config, $matches);
  101. return (isset($matches[1])) ? $matches[1] : '';
  102. }
  103. return '';
  104. }
  105. /**
  106.   * Gets the best guess of the "New Domain" based on this files location at runtime.
  107.   *
  108.   * @return string;
  109.   */
  110. public function getNewDomain() {
  111. $new_domain = str_replace('http://','', $_SERVER['SERVER_NAME']);
  112. if(isset($_SERVER['SERVER_PORT']) && strlen($_SERVER['SERVER_PORT']) > 0 && $_SERVER['SERVER_PORT'] != 80) {
  113. $new_domain .= ':'.$_SERVER['SERVER_PORT'];
  114. }
  115. return $new_domain;
  116. }
  117. /**
  118.   * Gets the "siteurl" WordPress option (if possible).
  119.   *
  120.   * @return mixed; false if not found.
  121.   */
  122. public function getOldDomain() {
  123. if($this->isConfigLoaded()) {
  124. $mysqli = @new mysqli($this->getConfigConstant('DB_HOST'), $this->getConfigConstant('DB_USER'), $this->getConfigConstant('DB_PASSWORD'), $this->getConfigConstant('DB_NAME'));
  125. if(mysqli_connect_error()) {
  126. $this->notices[] = 'Unable to connect to this server\'s database using the settings from wp-config.php; check that it\'s properly configured.';
  127. } else {
  128. $result = $mysqli->query('SELECT * FROM '.$this->getConfigTablePrefix().'options WHERE option_name="siteurl";');
  129. if(is_object($result) && ($result->num_rows > 0)) {
  130. $row = $result->fetch_assoc();
  131. return str_replace('http://','', $row['option_value']);
  132. } else {
  133. $this->error[] = 'The WordPress option_name "siteurl" does not exist in the "'.$this->getConfigTablePrefix().'options" table!';
  134. }
  135. }
  136. }
  137. return false;
  138. }
  139. /**
  140.   * Returns true if the wp-config.php file was loaded successfully.
  141.   *
  142.   * @return bool;
  143.   */
  144. public function isConfigLoaded() {
  145. return (strlen($this->config) > 0);
  146. }
  147. /**
  148.   * Replace $find with $replace in a string segment and still keep the integrity of the PHP serialized string.
  149.   *
  150.   * Example:
  151.   * ... s:13:"look a string"; ...
  152.   * serializedReplace('string', 'function', $serialized_string)
  153.   * ... s:15:"look a function"; ...
  154.   *
  155.   * @param string;
  156.   * @param string;
  157.   * @param string;
  158.   * @return string;
  159.   */
  160. public static function serializedStrReplace($find, $replace, $haystack) {
  161. $length_diff = strlen($replace) - strlen($find);
  162. $find_escaped = self::preg_quote($find, '!');
  163. if(preg_match_all('!s:([0-9]+):"([^"]*?'.$find_escaped.'{1}.*?)";!', self::regExpSerializeEncode($haystack), $matches)) {
  164. $matches = array_map(array(__CLASS__,'regExpSerializeDecode'), $matches);
  165. $match_count = count($matches[0]);
  166. for($i=0;$i<$match_count;$i++) {
  167. $new_string = str_replace($find, $replace, $matches[2][$i], $replace_count);
  168. $new_length = ((int) $matches[1][$i]) + ($length_diff * $replace_count);
  169. $haystack = str_replace($matches[0][$i], 's:'.$new_length.':"'.$new_string.'"', $haystack);
  170. }
  171. }
  172. return $haystack;
  173. }
  174. /**
  175.   * Enhanced version of preg_quote() that works properly in PHP < 5.3
  176.   *
  177.   * @param string;
  178.   * @param mixed; string, null default
  179.   * @return string;
  180.   */
  181. public static function preg_quote($string, $delimiter = null) {
  182. $string = preg_quote($string, $delimiter);
  183. if(phpversion() < 5.3) $string = str_replace('-', '\-', $string);
  184. return $string;
  185. }
  186. /**
  187.   * Attempts to load the wp-config.php file into $this->config
  188.   *
  189.   * @return void;
  190.   */
  191. private function loadConfigFile() {
  192. $this->config = file_get_contents(dirname(__FILE__).'/wp-config.php');
  193. if(!$this->isConfigLoaded()) {
  194. $this->notices[] = 'Unable to find "wp-config.php" ... Make sure the '.basename(__FILE__).' file is in the root WordPress directory.';
  195. } else {
  196. $this->actions[] = 'wp-config.php file successfully loaded.';
  197. }
  198. }
  199.  
  200.  
  201. /**
  202.   * Replaces any occurrence of " (double quote character) within the value
  203.   * of a serialized string segment with [DOUBLE_QUOTE]. This allows for RegExp
  204.   * to properly capture string segment values in self::serializedStrReplace().
  205.   *
  206.   * Example:
  207.   * ... s:13:"look "a" string"; ...
  208.   * regExpSerializeEncode($serialized_string)
  209.   * ... s:13:"look [DOUBLE_QUOTE]a[DOUBLE_QUOTE] string"; ...
  210.   *
  211.   * @param string;
  212.   * @return string;
  213.   */
  214. private static function regExpSerializeEncode($string) {
  215. if(preg_match_all('!s:[0-9]+:"(.+?)";!', $string, $matches)) {
  216. foreach($matches[1] as $match) {
  217. $string = str_replace($match, str_replace('"', '[DOUBLE_QUOTE]', $match), $string);
  218. }
  219. }
  220. return $string;
  221. }
  222.  
  223. /**
  224.   * Undoes the changes that self::regExpSerializeEncode() made to a string.
  225.   *
  226.   * @see self::regExpSerializeEncode();
  227.   * @param string;
  228.   * @return string;
  229.   */
  230. private static function regExpSerializeDecode($string) {
  231. return str_replace('[DOUBLE_QUOTE]', '"', $string);
  232. }
  233. }
  234. /* == START PROCEDURAL CODE ============================================== */
  235. // Config/Safety Check
  236. if(DDWPDC_PASSWORD == 'Replace-This-Password') {
  237. die('This script will remain disabled until the default password is changed.');
  238. }
  239. // Password Check -> Set Cookie -> Redirect
  240. if(isset($_POST['auth_password'])) {
  241. /**
  242.   * Try and obstruct brute force attacks by making each login attempt
  243.   * take 5 seconds.This is total security-through-obscurity and can be
  244.   * worked around fairly easily, it's just one more step.
  245.   *
  246.   * MAKE SURE you remove this script after the domain change is complete.
  247.   */
  248. sleep(5);
  249. if(md5($_POST['auth_password']) == md5(DDWPDC_PASSWORD)) {
  250. $expire = time() + DDWPDC_COOKIE_LIFETIME;
  251. setcookie(DDWPDC_COOKIE_NAME_AUTH, md5(DDWPDC_PASSWORD), $expire);
  252. setcookie(DDWPDC_COOKIE_NAME_EXPIRE, $expire, $expire);
  253. die('<a href="'.basename(__FILE__).'">Click Here</a><script type="text/javascript">window.location = "'.basename(__FILE__).'";</script>');
  254. }
  255. }
  256. // Authenticate
  257. $is_authenticated = (isset($_COOKIE[DDWPDC_COOKIE_NAME_AUTH]) && ($_COOKIE[DDWPDC_COOKIE_NAME_AUTH] == md5(DDWPDC_PASSWORD))) ? true : false;
  258. // Check if user is authenticated
  259. if($is_authenticated) {
  260. $DDWPDC = new DDWordPressDomainChanger();
  261. try {
  262. // Start change process
  263. if(isset($_POST) && is_array($_POST) && (count($_POST) > 0)) {
  264. // Clean up data & check for empty fields
  265. $POST = array();
  266. foreach($_POST as $key => $value) {
  267. $value = trim($value);
  268. if(strlen($value) <= 0) throw new Exception('One or more of the fields was blank; all are required.');
  269. if(get_magic_quotes_gpc()) $value = stripslashes($value);
  270. $POST[$key] = $value;
  271. }
  272. // Check for "http://" in the new domain
  273. if(stripos($POST['new_domain'], 'http://') !== false) {
  274. // Let them correct this instead of assuming it's correct and removing the "http://".
  275. throw new Exception('The "New Domain" field must not contain "http://"');
  276. }
  277. // DB Connection
  278. $mysqli = @new mysqli($POST['host'], $POST['username'], $POST['password'], $POST['database']);
  279. if(mysqli_connect_error()) {
  280. throw new Exception('Unable to create database connection; most likely due to incorrect connection settings.');
  281. }
  282. // Escape for Database
  283. $data = array();
  284. foreach($_POST as $key => $value) {
  285. $data[$key] = $mysqli->escape_string($value);
  286. }
  287. /**
  288.   * Handle Serialized Values
  289.   *
  290.   * Before we update the options we need to find any option_values that have the
  291.   * old_domain stored within a serialized string.
  292.   */
  293. if(!$result = $mysqli->query('SELECT * FROM '.$data['prefix'].'options WHERE option_value REGEXP "s:[0-9]+:\".*'.$mysqli->escape_string(DDWordPressDomainChanger::preg_quote($POST['old_domain'])).'.*\";"')) {
  294. throw new Exception($mysqli->error);
  295. }
  296. $serialized_options = array();
  297. $options_to_exclude = '';
  298. if($result->num_rows > 0) {
  299. // Build dataset
  300. while(is_array($row = $result->fetch_assoc())) $serialized_options[] = $row;
  301.  
  302. // Build Exclude SQL
  303. foreach($serialized_options as $record) $options_to_exclude .= $record['option_id'].',';
  304. $options_to_exclude = ' WHERE option_id NOT IN('.rtrim($options_to_exclude, ',').')';
  305.  
  306. // Update Serialized Options
  307. foreach($serialized_options as $record) {
  308. $new_option_value = DDWordPressDomainChanger::serializedStrReplace($data['old_domain'], $data['new_domain'], $record['option_value']);
  309. if(!$mysqli->query('UPDATE '.$data['prefix'].'options SET option_value = "'.$mysqli->escape_string($new_option_value).'" WHERE option_id='.(int)$record['option_id'].';')) {
  310. throw new Exception($mysqli->error);
  311. }
  312. $DDWPDC->actions[] = '[Serialize Replace] Old domain ('.$data['old_domain'].') replaced with new domain ('.$data['new_domain'].') in option_name="'.$record['option_name'].'"';
  313. }
  314.  
  315. }
  316.  
  317. // Update Options
  318. if(!$mysqli->query('UPDATE '.$data['prefix'].'options SET option_value = REPLACE(option_value,"'.$data['old_domain'].'","'.$data['new_domain'].'")'.$options_to_exclude.';')) {
  319. throw new Exception($mysqli->error);
  320. }
  321. $DDWPDC->actions[] = 'Old domain ('.$data['old_domain'].') replaced with new domain ('.$data['new_domain'].') in '.$data['prefix'].'options.option_value';
  322. // Update Post Content
  323. $result = $mysqli->query('UPDATE '.$data['prefix'].'posts SET post_content = REPLACE(post_content,"'.$data['old_domain'].'","'.$data['new_domain'].'");');
  324. if(!$result) {
  325. throw new Exception($mysqli->error);
  326. } else {
  327. $DDWPDC->actions[] = 'Old domain ('.$data['old_domain'].') replaced with new domain ('.$data['new_domain'].') in '.$data['prefix'].'posts.post_content';
  328. }
  329. // Update Post GUID
  330. $result = $mysqli->query('UPDATE '.$data['prefix'].'posts SET guid = REPLACE(guid,"'.$data['old_domain'].'","'.$data['new_domain'].'");');
  331. if(!$result) {
  332. throw new Exception($mysqli->error);
  333. } else {
  334. $DDWPDC->actions[] = 'Old domain ('.$data['old_domain'].') replaced with new domain ('.$data['new_domain'].') in '.$data['prefix'].'posts.guid';
  335. }
  336. // Update post_meta
  337. $result = $mysqli->query('UPDATE '.$data['prefix'].'postmeta SET meta_value = REPLACE(meta_value,"'.$data['old_domain'].'","'.$data['new_domain'].'");');
  338. if(!$result) {
  339. throw new Exception($mysqli->error);
  340. } else {
  341. $DDWPDC->actions[] = 'Old domain ('.$data['old_domain'].') replaced with new domain ('.$data['new_domain'].') in '.$data['prefix'].'postmeta.meta_value';
  342. }
  343. // Update "upload_path"
  344. $upload_dir = dirname(__FILE__).'/wp-content/uploads';
  345. $result = $mysqli->query('UPDATE '.$data['prefix'].'options SET option_value = "'.$upload_dir.'" WHERE option_name="upload_path";');
  346. if(!$result) {
  347. throw new Exception($mysqli->error);
  348. } else {
  349. $DDWPDC->actions[] = 'Option "upload_path" has been changed to "'.$upload_dir.'"';
  350. }
  351. }
  352. } catch (Exception $exception) {
  353. $DDWPDC->errors[] = $exception->getMessage();
  354. }
  355. }
  356. ?>
  357. <html>
  358. <head>
  359. <title>WordPress Domain Changer by Daniel Doezema </title>
  360. <script type="text/javascript" language="Javascript">
  361. window.onload = function() {
  362. if(document.getElementById('seconds')) {
  363. window.setInterval(function() {
  364. var seconds_elem = document.getElementById('seconds');
  365. var bar_elem = document.getElementById('bar');
  366. var seconds = parseInt(seconds_elem.innerHTML);
  367. var percentage = Math.round(seconds / <?php echo DDWPDC_COOKIE_LIFETIME + 5; ?> * 100);
  368. var bar_color = '#00FF19';
  369. if(percentage < 25) {
  370. bar_color = 'red';
  371. } else if (percentage < 75) {
  372. bar_color = 'yellow';
  373. }
  374. if(seconds <= 0) window.location.reload();
  375. bar_elem.style.width = percentage + '%';
  376. bar_elem.style.backgroundColor = bar_color;
  377. seconds_elem.innerHTML = --seconds;
  378. }, 1000);
  379. }
  380. }
  381. </script>
  382. <style type="text/css">
  383. body {font:14px Tahoma, Arial;}
  384. div.clear {clear:both;}
  385. h1 {padding:0; margin:0;}
  386. h2, h3 {padding:0; margin:0 0 15px 0;}
  387. form { display:block; padding:10px; margin-top:15px; background-color:#FCFCFC; border:1px solid gray;}
  388. form label {font-weight:bold;}
  389. form div {margin:0 15px 15px 0;}
  390. form div input {width:80%;}
  391. #left {width:35%;float:left;}
  392. #right {margin-top:5px;float:right; width:63%; text-align:left;}
  393. div.log {padding:5px 10px; margin:10px 0;}
  394. div.error { background-color:#FFF8F8; border:1px solid red;}
  395. div.notice { background-color:#FFFEF2; border:1px solid #FDC200;}
  396. div.action { background-color:#F5FFF6; border:1px solid #01BE14;}
  397. #timeout {padding:5px 10px 10px 10px; background-color:black; color:white; font-weight:bold;position:absolute;top:0;right:10px;}
  398. #bar {height:10px;margin:5px 0 0 0;}
  399. </style>
  400. </head>
  401. <body>
  402. <h1>WordPress Domain Changer <iframe src="http://ghbtns.com/github-btn.html?user=veloper&repo=WordPress-Domain-Changer&type=watch&count=true"
  403. allowtransparency="true" frameborder="0" scrolling="0" width="110px" height="20px"></iframe></h1>
  404. <span>By <a href="http://dan.doezema.com" target="_blank">Daniel Doezema</a></span>
  405. <div class="body">
  406. <?php if($is_authenticated): ?>
  407. <div id="timeout">
  408. <div>You have <span id="seconds"><?php echo ((int) $_COOKIE[DDWPDC_COOKIE_NAME_EXPIRE] + 5) - time(); ?></span> Seconds left in this session.</div>
  409. <div id="bar"></div>
  410. </div>
  411. <div class="clear"></div>
  412. <div id="left">
  413. <form method="post" action="<?php echo basename(__FILE__); ?>">
  414. <h3>Database Connection Settings</h3>
  415. <blockquote>
  416. <?php
  417. // Try to Auto-Detect Settings from wp-config.php file and pre-populate fields.
  418. if($DDWPDC->isConfigLoaded()) $DDWPDC->actions[] = 'Attempting to auto-detect form field values.';
  419. ?>
  420. <label for="host">Host</label>
  421. <div><input type="text" id="host" name="host" value="<?php echo $DDWPDC->getConfigConstant('DB_HOST'); ?>" /></div>
  422.  
  423. <label for="username">User</label>
  424. <div><input type="text" id="username" name="username" value="<?php echo $DDWPDC->getConfigConstant('DB_USER'); ?>" /></div>
  425.  
  426. <label for="password">Password</label>
  427. <div><input type="text" id="password" name="password" value="<?php echo $DDWPDC->getConfigConstant('DB_PASSWORD'); ?>" /></div>
  428.  
  429. <label for="database">Database Name</label>
  430. <div><input type="text" id="database" name="database" value="<?php echo $DDWPDC->getConfigConstant('DB_NAME'); ?>" /></div>
  431.  
  432. <label for="prefix">Table Prefix</label>
  433. <div><input type="text" id="prefix" name="prefix" value="<?php echo $DDWPDC->getConfigTablePrefix(); ?>" /></div>
  434. </blockquote>
  435.  
  436. <label for="old_domain">Old Domain</label>
  437. <div>http://<input type="text" id="old_domain" name="old_domain" value="<?php echo $DDWPDC->getOldDomain(); ?>" /></div>
  438.  
  439. <label for="new_domain">New Domain</label>
  440. <div>http://<input type="text" id="new_domain" name="new_domain" value="<?php echo $DDWPDC->getNewDomain(); ?>" /></div>
  441.  
  442. <input type="submit" id="submit_button" name="submit_button" value="Change Domain!" />
  443. </form>
  444. </div>
  445. <div id="right">
  446. <?php if(count($DDWPDC->errors) > 0): foreach($DDWPDC->errors as $error): ?>
  447. <div class="log error"><strong>Error:</strong> <?php echo $error; ?></div>
  448. <?php endforeach; endif; ?>
  449.  
  450. <?php if(count($DDWPDC->notices) > 0): foreach($DDWPDC->notices as $notice): ?>
  451. <div class="log notice"><strong>Notice:</strong> <?php echo $notice; ?></div>
  452. <?php endforeach; endif; ?>
  453.  
  454. <?php if(count($DDWPDC->actions) > 0): foreach($DDWPDC->actions as $action): ?>
  455. <div class="log action"><strong>Action: </strong><?php echo $action; ?></div>
  456. <?php endforeach; endif; ?>
  457. </div>
  458. <?php else: ?>
  459. <?php if(isset($_POST['auth_password'])): ?>
  460. <div class="log error"><strong>Error:</strong> Incorrect password, please try again.</div>
  461. <?php endif; ?>
  462. <form id="login" name="login" method="post" action="<?php echo basename(__FILE__); ?>">
  463. <h3>Authenticate</h3>
  464. <label for="auth_password">Password</label>
  465. <input type="password" id="auth_password" name="auth_password" value="" />
  466. <input type="submit" id="submit_button" name="submit_button" value="Submit!" />
  467. </form>
  468. <?php endif; ?>
  469. </div>
  470. </body>
  471. </html>

Report this snippet  

You need to login to post a comment.