query("SELECT slug FROM " . $yydev_redirect_table_name . " WHERE slug = '{$form_slug_name}' ");
if($form_submit_name_exists_check > 0 ) {
$submit_name_error = "The redirect name is already exists please choose different name";
} else { // if($form_submit_name_exists_check > 0 ) {
// If the content name not exists it will insert it into the database
$wpdb->insert( $yydev_redirect_table_name,
array('name'=>$form_submit_name,
'slug'=>$form_slug_name,
), array('%s', '%s') );
// Creating page link and redirect the user to the new url page where he can edit the content
$new_detabase_id = $wpdb->insert_id;
$new_page_link = $plugin_page_url . "&view=secondary&id=" . $new_detabase_id;
yydev_redirect_redirections_page($new_page_link);
} // } else { // if($form_submit_name_exists_check > 0 ) {
} // if( !empty($_POST['form_submit_name']) ) {
} // if( isset($_POST['submit_new_form']) ) {
?>
">
Advanced 301/302 Redirect
Add Redirect
| ID |
Redirect Name |
No. of redirects |
Action |
get_results("SELECT * FROM " . $yydev_redirect_table_name . " ORDER BY id DESC ");
// Echo if nothing was found
if(empty($database_content_output)) {
?>
| No. redirects where found |
| id; ?>">id; ?> |
id; ?>">name; ?> |
query("SELECT * FROM " . $yydev_secondary_table_name . " WHERE secondary_id = " . $database_output->id ); ?> |
id; ?>">Edit Redirect /
id; ; ?>">Delete Redirect |
| ID |
Redirect Name |
No. of redirects |
Action |