deano2010 Posted March 21, 2010 Share Posted March 21, 2010 Hey, I really new to php and am looking for some help with a php notepad which it will store notes in a database.. I have been searching for a few hours and all i can seem to find is that program notepad++ or some scripts which are complicated. Can you help me by posting the php database mysql query and php code for the notepad.. I would be very grateful if you could help me out. Thanks Deanow2010 Quote Link to comment Share on other sites More sharing options...
jamiet757 Posted March 21, 2010 Share Posted March 21, 2010 It would be easier to help if you found a script that you liked and posted what you couldn't figure out to do. I don't think anyone on this site is going to write you an entire script for free, but we will gladly help you with some smaller issues. Quote Link to comment Share on other sites More sharing options...
deano2010 Posted March 21, 2010 Author Share Posted March 21, 2010 It would be easier to help if you found a script that you liked and posted what you couldn't figure out to do. I don't think anyone on this site is going to write you an entire script for free, but we will gladly help you with some smaller issues. Its just a couple of lines of php in a form is what i need and the mysql query ... Not a full entire script.. Quote Link to comment Share on other sites More sharing options...
5kyy8lu3 Posted March 21, 2010 Share Posted March 21, 2010 you said you wanted just the queries so here's a start: CREATE TABLE Notepad ( ID INT AUTO_INCREMENT PRIMARY KEY, Note TEXT ); INSERT INTO Notepad SET Note="This is an admin note" Quote Link to comment Share on other sites More sharing options...
oni-kun Posted March 21, 2010 Share Posted March 21, 2010 Its just a couple of lines of php in a form is what i need and the mysql query ... Not a full entire script.. If you do not understand such basic tasks, the methodology is simple (escaping and storing a POST form into a query after escaping/sanitizing it), but it can't be done without you not knowing how to accomplish most of these tasks first. Quote Link to comment Share on other sites More sharing options...
deano2010 Posted March 22, 2010 Author Share Posted March 22, 2010 you said you wanted just the queries so here's a start: CREATE TABLE Notepad ( ID INT AUTO_INCREMENT PRIMARY KEY, Note TEXT ); INSERT INTO Notepad SET Note="This is an admin note" Thanks but would you be able to give me the php too Quote Link to comment Share on other sites More sharing options...
oni-kun Posted March 22, 2010 Share Posted March 22, 2010 Thanks but would you be able to give me the php too variables mysql_query Quote Link to comment Share on other sites More sharing options...
5kyy8lu3 Posted March 22, 2010 Share Posted March 22, 2010 you said you wanted just the queries so here's a start: CREATE TABLE Notepad ( ID INT AUTO_INCREMENT PRIMARY KEY, Note TEXT ); INSERT INTO Notepad SET Note="This is an admin note" Thanks but would you be able to give me the php too $Query = 'CREATE TABLE Notepad ( ID INT AUTO_INCREMENT PRIMARY KEY, Note TEXT );'; $Result = mysqli_query($Connection, $Query); if ( !$Result ) { die("Error running mysql query."); } $Query = 'INSERT INTO Notepad SET Note="This is an admin note"'; $Result = mysqli_query($Connection, $Query); if ( !$Result ) { die("Error running mysql query."); } $Query = 'SELECT Note FROM Notepad ORDER BY ID DESC LIMIT 1'; $Result = mysqli_query($Connection, $Query); if ( !$Result ) { die("Error running mysql query."); } $Row = mysqli_fetch_array($Result); echo 'Newest admin note: ' . $Row['Note']; that gives you an idea, but honestly you really need to go read some basic mysql and php tutorials. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.