php- changing text box's to already known values -
php- changing text box's to already known values -
hey guys have chunk of code here takes 3 values , creates sub domains based off of entries. wondering how take thought of form , modify it. trying set in php variables text entry box's are. can expert reply , tell me how done?
<form method="post" action="<?php echo network_admin_url('site-new.php?action=add-site'); ?>"> <?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ) ?> <table class="form-table"> <tr class="form-field form-required"> <th scope="row"><?php _e( 'site address' ) ?></th> <td> <?php if ( is_subdomain_install() ) { ?> <input name="blog[domain]" type="text" class="regular-text" title="<?php _e( 'domain' ) ?>"/>.<?php echo preg_replace( '|^www\.|', '', $current_site->domain );?> <?php } else { echo $current_site->domain . $current_site->path ?><input name="blog[domain]" class="regular-text" type="text" title="<?php _e( 'domain' ) ?>"/> <?php } echo '<p>' . __( 'only characters a-z , 0-9 recommended.' ) . '</p>'; ?> </td> </tr> <tr class="form-field form-required"> <th scope="row"><?php _e( 'site title' ) ?></th> <td><input name="blog[title]" type="text" class="regular-text" title="<?php _e( 'title' ) ?>"/></td> </tr> <tr class="form-field form-required"> <th scope="row"><?php _e( 'admin email' ) ?></th> <td><input name="blog[email]" type="text" class="regular-text" title="<?php _e( 'email' ) ?>"/></td> </tr> <tr class="form-field"> <td colspan="2"><?php _e( 'a new user created if above email address not in database.' ) ?><br /><?php _e( 'the username , password mailed email address.' ) ?></td> </tr> </table> <?php submit_button( __('add site'), 'primary', 'add-site' ); ?>
<input name="blog[email]" type="text" class="regular-text" title="<?php _e( 'email' ) ?>" value="<?php _e($array['email']);?>"/>
$array['email'] variable hold info should prefiled or can $email
php
Comments
Post a Comment