Guest newb001 Posted August 4, 2006 Share Posted August 4, 2006 Can someone tell me how to make the $_get Variable can post publicly so i dont have to edit html to update my news? I am a beginner of the php code and html in general! please i need help! Thank you in advance. Link to comment Share on other sites More sharing options...
The Reverend Posted August 4, 2006 Share Posted August 4, 2006 I'm not sure what you're asking. I think you may be confused a bit. $_GET variables are transmitted through urls but they generally aren't big strings of data. Are you using a database? Link to comment Share on other sites More sharing options...
dcole.ath.cx Posted August 4, 2006 Share Posted August 4, 2006 well if you update your news your going to have to edit the file... or a file.$test = $_GET['text']this will get blah from example.com?text=blah and put it into variable $test.Then you can print $test like: print $test;Then to link to the page you have to link to example.com?text=blahIf you change the content, you will have to change the link. Link to comment Share on other sites More sharing options...
ThePsion5 Posted August 4, 2006 Share Posted August 4, 2006 Well, you may be able to do something similar to this if you only need to add small blurbs to your website:page.php?addnewsitem=true&title=thetitle&text=ashortblurboftextthatyoucanactuallytypeinabrowserwindow&auth=somevariableThen you could have a php function that looks something like this: function checkForUpdates(){$add = $_GET['addnewsitem'];$title = $_GET['title'];$text = $_GET['text'];$auth = $_GET['auth'];if(strcmp($add, 'true') === 0 && isProperAuth($auth)) //If the proper authentication is used...{//add the text to the file that contains all the news}else{//display the news}}function isProperAuth($authentication){/*Check to see if the proper authentication was provided. Since the get values are stored in the browser history, you should use a variable that changes over time (that you can keep track of). Like, the hour and minute of your server plus 13 minutes in a weird format, for example. That way it won't be decoded unless someone is looking for it fairly hard, lol.*/} However, i should stress that this method is not very secure...it wouldn't take much for someone to crack it even without your browser's history at their disposal. Just a warning. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now