i am getting this error message “Sorry, you are not allowed to access this page”. when i go to my page http://localhost/wordpressstuff/wp-admin/options-general.php?page=editstuff?id=4 that is when i get the error but when i remove ?id=4 it removes the error i am trying to do a edit mysql table row but for some reason i am getting this in wordpresS HERE IS MY CODE:
/** Step 2 (from text above). */ add_action( 'admin_menu', 'my_edit_news_menu' ); /** Step 1. */ function my_edit_news_menu() { add_options_page( 'My Plugin Options', '', 'manage_options', 'editstuff', 'edit_news' ); } /** Step 3. */ function edit_news() { if ( !current_user_can( 'manage_options' ) ) { wp_die( __( 'Well You do not have sufficient permissions to access this page. Embarassing is'nt it' ) ); } ...
hERE IS THE LINK THAT I CLICK TO GET TO THAT PAGE
<h3><?php echo $row['title']; ?></h3> <h4 style="color: lightblue;"><a href="">Delete</a></h4> <h4 style="color: lightblue;"><a href="http://kollossus.com/wp-admin/options-general.php?page=editstuff?id=<?php echo $row['id']; ?>">Edit</a></h4>
Which is in a different page like the first one up there the first bit of code only exception is the stuff is different the url etc.
Thank You
Advertisement
Answer
Change options-general.php?page=editstuff?id=...
to options-general.php?page=editstuff&id=...