Jump to content
xisto Community

HannahI

Members
  • Content Count

    351
  • Joined

  • Last visited

Everything posted by HannahI

  1. Sorry if a misplaced my problem. I use my online rtf generater like a normally would. I hit the download button. My browser shows me it was downloaded succussfully. I opened up my text editor and it didn't work.
  2. Well, Sten's answer I agree with. When answering question and getting answer from other, make sure you know all of the facts. Are they religous? Do the keep up with technology? Do they really understand what the question's asking? Just my oppinion.
  3. NASA is the only one that is getting off thier laziness, Appolo 8 was NASA, too!
  4. I have a script that goes to a social networking site that I am creating. I am having some difficultys using this script to post data on the users page for others to see the users thoughts. Just in case you need more information, I have plenty more in log files I write to in the script. I hope you can help me get the script working. By the way, don't blame me because I'm not using MySQL because you won't get me to switch. <?php// Initsession_start();if(!session_is_registered(myusername)){ header("Location:mainlogin.php? next=post.php");}// Declare Variables and Arrays$months = array("Jan-","Feb-","Mar-","Apr-","May-","Jun-","Jul-","Aug-","Sep-","Oct-","Nov-","Dec-");$days = array("Sun-","Mon-","Tue-","Wed-","Thu-","Fri-","Sat-");$years = array(2010);$page = $_SESSION['username'].'.html';// Generate Past Post Data $current = str_replace("<html><head><link rel='stylesheet' href='style.css'></link><title>".$_SESSION['username']."</title><body><img src='logo.gif' width=235 height=95 /><br />".$_SESSION['username']."'s Page <br />","",$page);$current = str_replace("<form action='comment.php' method='get'><input type='hidden' name='current' value='I am getting hungry! Time for dinner.'><input type='hidden' name='page' value='".$_SESSION['username'].".html'>`<input type='text' name='new'><input type='submit' value='Comment'></form><span style='font-style:italic;'>Last Updated on ","",$current);$current = str_replace($months,"",$current);$current = str_replace($days,"",$current);$current = str_replace($years,"",$current);$current = str_replace("</span></body></html>","",$current);// Create a new file$fileUp = file_get_contents($page);$new = $current.'<br />'."<span style='color:".$_POST['importantColor']."'>".$_POST['new']."</span>";$fileDown = str_replace($current,$new,$fileUp);echo $new;// Write to log$log = fopen("friendbooklog.txt","wb");fwrite($log,"Old: \n".$fileUp."\n"."New: \n".$current);fclose($log);// If required, update pageif($_POST['go'] == 1) {$fp = fopen($page,'w+') or die("dead");fwrite($fp,$fileDown);fclose($fp);header("Location: $page");}// Debug?><!-- Form Data --!><html><head><title>Post Content on <?php echo $_SESSION['username']; ?><link rel="stylesheet" href="style.css"></link></head><body><img id="logo" src="logo.gif" width="234" height="95"> <br />Hello, <? echo $_SESSION['username']; ?><form action="?" method="post"><input type="hidden" name="go" value="1"><textarea rows="10" cols=30" name="new">Put Content Here</textarea> <br />This is<input type="radio" name="importantColor" value="#990000">Important<input type="radio" name="importantColor" value="#000000">Not important <br /><input type="hidden" name="page" value="<?php $_SESSION['username'].'.html'; ?>"><input tupe=<input type="submit" value="Post"></form></body></html>
  5. Pii is correct. I will now show you how to create one without mysql though. <html><head></head><body><form action="?" method="post">Command:<input type="text" name="command2"><?phpif(isset($_SESSION['command2']) {echo '<input type="hidden" name="command3" value=".$_SESSION['command2'].">';} else if(isset($_SESSION['command3']) {echo '<input type="hidden" name="command4" value=".$_SESSION['command3'].">';}?><input type="hidden" name="go" value="1"><input type="submit"><?phpif($_POST['go'] == 1) {// begin gameecho $_SESSION['command4'];echo $_SESSION['command3'];echo $_SESSION['command2'];//put game here$_SESSION['command3'] == $_SESSION['command2'];$_SESSION['command4'] == $_SESSION['command3']; }?></form></body></html>Hope that helped! Hannah
  6. I once did a very basic facebook app, but then I was bored. Here, I'll walk you through Facebook Developing. 1: Get a Facebook Account (of course) 2: Install the developer application 3: Click the 'Create an Application' button 4: Go through the pages and fill out the details 5: Install the PHP Facebook Library from the Developer app homepage 6: Get your Application Secret and API Key 7: Create the Hello World Application:
  7. Now that I'm finally back on the net, I wanna say 8ennet helped. I've also added md5 for protection. But now that I have a register script and a login script, I want to be able to have some php code that will say "Hello, FirstName". If you need it, this is the sql for the table: CREATE TABLE `accounts` ( `username` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, `email` varchar(100) NOT NULL, `level` varchar(50) NOT NULL, `fname` varchar(50) NOT NULL, `lname` varchar(50) NOT NULL, `friends` mediumtext NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1;The code up there is really just from the export command, so I'm not sure if it will help you find a solution for the new problem of displaying a greeting. When the script loads I will have the username. Since I have the username, you just need to provide this: function displayGreating($name) {// code goes here......}Hope you can help me, Hannah
  8. Still, no use. P.S. This is the current code: <?php$link = mysql_connect('localhost:8889','root','root');if(!$link) {die('Error, Whoops: ' . mysql_error());}mysql_real_escape_string($_POST['username']);mysql_real_escape_string($_POST['password']);mysql_real_escape_string($_POST['email']);$sql = "INSERT INTO `accounts`.`info` (`username`, `password`, `email`, `level`) VALUES ('". $_POST['username'] . "', '". $_POST['password'] . "', '" . $_POST['email'] . "','1');";echo $sql;if(!$sql) {die('Error');}mysql_close($link);?>
  9. So I made a test account using the mod code, and this is the output:INSERT INTO `accounts`.`info` (`username`, `password`, `email`, `level`) VALUES (mysqltest, testing123', test@mysql.com','1');
  10. Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /Users/Hannah/Desktop/- on line 6
  11. I get errors when I execute the following script: <?php$link = mysql_connect('localhost','root','root');if(!$link) {die('Error, Whoops: ' . mysql_error());}$sql = "INSERT INTO `accounts`.`info` (`username`, `password`, `email`, `level`) VALUES (\". $_POST['username'] . "\, \". $_POST['password'] . "\', \" . $_POST['email'] . "\', \'1');";echo $sql;if(!$sql) {die('Error');}mysql_close($link);?>
  12. No, I don't. But why would you need the user part?
  13. Thats all I really read, just release the question mark and Who keeps fish
  14. Isn't the answer "Who". I didn't read anything. Don't laugh at my guessing algorithm.
  15. Tried it all, no use going to ***.***.*.*:1234.
  16. I put in: Listen 1234I needed to get past Mr. ISP and his mental issues. (firewall)
  17. Quatrux, I'm on a mac, and I didn't install Apache, since Mac was built on a FreeBSD on automaticly comes with Apache.
  18. I forgot to say that even if I do the sudo apacheclt start thing terminal will say something simmilar to "Apache is all ready on".
  19. As said in the descripition, LOCALHOST/ will output the error: Safari can't open the page LOCALHOST/ because it cannot connect to the server localhost. I checked the apache error log, httpd.conf syntax, and Skype ports but I am still getting the stupid error. Hope you can help me, -Hannah
  20. I am writing I script to generate RTF files. But the problem is that as soon as I hit the open button, my texteditor occurs an error. Can someone please fix my code? Here it is: <div class="page" style="background:white;"> <form action="?" method="post"> <select name="font"> <option value="Arial">Arial</option> <option value="Times">Times New Roman</option> </select> <br /> <textarea name="text"> Type Here </textarea> <input type="hidden" name="done" value="1"> <br/> <input type="submit"> </form> <?php $text = ' {\rtf\ansi\ansicpg\1252\cocoartf1038\cocoasubrtf250 {\fontb1\f0\fswiss\fcharset() '.$_POST['font'].';} {\colorb1;\red255\green255\blue255;} \margl440\margl440\vieww9000\veiwh8400\viewkind() \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6489\tx7200\tx7920\tx8640\ql\qnatural\pardirnatutal \f0\fs24 \cf() '.$_POST['text'].' } '; if($_POST['done'] == 1) { $fp = fopen('writetest.rtf','w+'); fwrite($fp,$text); fclose($fp); echo '<a href="writetest.rtf">Download</a>'; } ?> </div>Thanks, -Hannah
  21. It it on my own mac. I was reading the readme file and it said that the default root password is left blank.
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.