Results 1 to 1 of 1
-
17th Jan 2012, 03:52 AM #1OPMember
Help PHP
need to put the system of delivery of testimony in another page
I took the code page of the Administrator.
is this:
Code:// +---------------------------------------------------------------------------+ // | Add New Testimonial | // +---------------------------------------------------------------------------+ /* add new testimonial form */ function sfstst_newform() { ?> <div class="wrap"> <h2>Add New Testimonial</h2> <ul> <li>If you want to include this testimonial in the random block, you must have content in the "short text" field.</li> <li>You must have content in the "full text" field for this testimonial to show on your Testimonials page.</li> </ul> <br /> <div id="sfstest-form"> <form name="addnew" method="post" action="<?php echo str_replace( '%7E', '~', $_SERVER['REQUEST_URI']); ?>"> <label for="clientname">Client Name:</label><input name="clientname" type="text" size="45"><br/> <label for="company">Company:</label><input name="company" type="text" size="45"><br/> <label for="website">Website:</label><input name="homepage" type="text" size="45" value="http://" onFocus="this.value=''"><br/> <label for="text_short">Short text (20-30 words for random block):</label><textarea name="text_short" cols="45" rows="5"></textarea><br/> <label for="text_full">Full text:</label><textarea name="text_full" cols="45" rows="15"></textarea><br/> <label for="sfimgurl">Image URL:</label><input name="sfimgurl" type="text" size="10"> (copy File URL from <a href="<?php echo admin_url('/upload.php'); ?>" target="_blank">Media</a>) <br/> <label for="storder">Sort order:</label><input name="storder" type="text" size="10"> (optional) <br/> <input type="submit" name="sfstst_addnew" value="<?php _e('Add Testimonial', 'sfstst_addnew' ) ?>" /><br/> </form> </div> </div> <?php } /* insert testimonial into DB */ function sfstst_insertnew() { global $wpdb; $table_name = $wpdb->prefix . "testimonials"; $txt_short = $wpdb->escape($_POST['text_short']); $txt_long = $wpdb->escape($_POST['text_full']); $clientname = $wpdb->escape($_POST['clientname']); $company = $wpdb->escape($_POST['company']); $homepage = $_POST['homepage']; $sfimgurl = $_POST['sfimgurl']; $storder = $_POST['storder']; $insert = "INSERT INTO " . $table_name . " (text_short,text_full,clientname,company,homepage,sfimgurl,storder) " . "VALUES ('$txt_short','$txt_long','$clientname','$company','$homepage','$sfimgurl','$storder')"; $results = $wpdb->query( $insert ); }
ctoveloz Reviewed by ctoveloz on . Help PHP need to put the system of delivery of testimony in another page I took the code page of the Administrator. is this: // +---------------------------------------------------------------------------+ // | Add New Testimonial | // +---------------------------------------------------------------------------+ /* add new testimonial form */ function sfstst_newform() { Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
themaCreator - create posts from...
Version 3.47 released. Open older version (or...