Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Admin Tools

Status
Not open for further replies.

cksrealm

ISP
Nov 10, 2001
12
0
0
US
Hi All

I am looking for something that I can use to update/edit entries in a database. The database is MySQL and looking for an admin tool that can be done through a website. I am not looking for something like PhPMyAdmin as this is something that I will need to have users do and not admin only.
 
If you don't want to give your users as much power as is available through something like PHPMyAdmin, your best bet might be writing a backend using PHP yourself.
 
All

After lookign around the place I have not been able to find the required script so I have decided to rite my own in PHP I am very new this php however. From reading over the documentation that I have found I belive that the following script should at least connect to a server select the database and close the connection. Please can you let me know if this is correct or not.

Thanks

Code is as follows.

<?

/* Connect to the MySQL Database

$link=mysql_connect(&quot;localhost&quot;,&quot;user&quot;,(&quot;password&quot;)

or die(&quot;Sorry could not connect to database. Please contact support&quot;)

/* Select Database to run script on

mysql_select_db(&quot;db_name&quot;) or die (&quot;Could not select required Database&quot;)

/* Closing connection to Database

mysql_close($link);
 
In PHP, you must terminate every line with a semicolon.

Your use of parentheses wanders a bit in your invocation of mysql_connect().

You'll have better success debugging your MySQL communication code if you do something like &quot;... or die (mysql_error());&quot;

But other than that, you seem to have the gist of it.

Want the best answers? Ask the best questions: TANSTAAFL!!
 
You might create different user accounts for MySQL that limit what your subordinates can do. With the limited MySQL functionality, you could then offer phpmyadmin.

- - picklefish - -

Why is everyone in this forum responding to me as picklefish?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top