zyrolasting Posted November 20, 2009 Share Posted November 20, 2009 My website is database driven and I am very tired of manually making queries to my tables in order to update my site. I decided to make a form that only I should have access to that PHP can filter and send to my tables for me. I have two questions for this. 1. I can tell that it's only a str_replace() away to make [ quote ] or [ code ] tags work, but what about tags that can have attributes? How do I parse those with minimum headache? 2. How do I make sure only I have the ability to upload content, preferably from just my machine? Wouldn't it be dangerous to upload a form to my host that has those kind of privileges? It also seems silly to me to put it there and toss a password on it, but only because I've never seen that done. Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/ Share on other sites More sharing options...
GingerRobot Posted November 20, 2009 Share Posted November 20, 2009 My website is database driven and I am very tired of manually making queries to my tables in order to update my site Couldn't you use PHPMyAdmin? Or are you talking more about content management and basically need a real light CMS? Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962191 Share on other sites More sharing options...
zyrolasting Posted November 21, 2009 Author Share Posted November 21, 2009 need a real light CMS? That's probably it, but what I intend to do really should not take anything more than another small PHP script I could write in 2 hours at most. Again, I just want PHP to take care of the following for me: Use custom tags (with attributes) to replace with relevant HTML and make my SQL queries. One concern is security. I could do what I want from my testing server, but that would lock my ability to make edits to one system. I want to be able to do this anywhere on any system, so I may just upload the script to my host, not link to it and top it off with a password. I guess that's taken care of?There's still my issue on how to parse attributes in custom tags. Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962293 Share on other sites More sharing options...
jmajeremy Posted November 21, 2009 Share Posted November 21, 2009 For replacing the tags, you could, as you say, use str_replace() or something like: if(strpos($input,$bbcode) === true) { print '<foo>...<bar>'; } As for the security, you could just use .htaccess to only allow you access to the directory. An even more secure method would be to place the CMS on a seperate website altogether. Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962419 Share on other sites More sharing options...
GingerRobot Posted November 21, 2009 Share Posted November 21, 2009 There's still my issue on how to parse attributes in custom tags. Ok, well you'll need to be using regular expressions. There's some introductory material in the tutorial section of this website (http://www.phpfreaks.com/tutorial/regular-expressions-part1---basic-syntax), but if you were to google for some tutorials for implementing BB codes, you'd find exactly what you need. Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962453 Share on other sites More sharing options...
JAY6390 Posted November 21, 2009 Share Posted November 21, 2009 might be worth looking at php's bbcode functions too http://www.php.net/manual/en/ref.bbcode.php Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962473 Share on other sites More sharing options...
GingerRobot Posted November 21, 2009 Share Posted November 21, 2009 might be worth looking at php's bbcode functions too http://www.php.net/manual/en/ref.bbcode.php Heh, must be new. Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962475 Share on other sites More sharing options...
zyrolasting Posted November 21, 2009 Author Share Posted November 21, 2009 I think I see what I have to do, so I'll make my attempt. Thanks so much guys! The regex reference and other suggestions have been a great help! EDIT: Where did the "Solved" button go...? Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962541 Share on other sites More sharing options...
cags Posted November 21, 2009 Share Posted November 21, 2009 EDIT: Where did the "Solved" button go...? The 'Topic Solved' mod hasn't been installed since the forum update. I believe it will be eventually though so don't forget about it. Heh, must be new. I wasn't aware of this extension either. The documentation was last updated yesterday (20th Nov), looks like the extension has been around at least a couple of months though. Link to comment https://forums.phpfreaks.com/topic/182330-easy-administration-on-mysql-databases/#findComment-962555 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.