Jump to content

Sniffy

Members
  • Posts

    403
  • Joined

  • Last visited

Posts posted by Sniffy

  1. For a preloader, stick this in the main timeline.onEnterFrame = function(){_root.createTextField("percentText", x, y, width, height);percent = int(getBytesLoaded()/getBytesTotal())*100;with(percentText){text = percent+"%";textColor = "0xFFFFFF";}I hope this works, I haven't really tested it.Asign any properties you like to the percentText.

  2. Whoa, you guys gathered a lot of info on space.I wonder when we'll actually be able to travel throughout the galaxies, or if we'll ever be able to.There's certainly life out there, sometimes I wonder if I want to know out there.-Ignorance is Bliss- :)

  3. I'm taking a java course soon.Here's the stupid nonsense code I just made.....Hello.java

    class Hello{	public static void main(String[] args) {		short fNum = 3;		short sNum = 4;		String explain = "The remainder of the 4 divided by 3 is ";	   int myVar = sNum%fNum;	   if(myVar == 1){	   myVar++;	   }	   else{	   	myVar = 0;	   }		System.out.println(explain+myVar+".");	}}

  4. I have a form, and users can write to the text file, but if they don't know html they'll mess it up by not using linebreaks, how can I use like str_replace() function to replace linebreaks in the form with <br /> tags to make the linebreaks?

  5. Really?That'll work out fine if I get the Adobe Studio and take a course in January for discount pricing. I thought Dreamweaver was just for layouts, but now that I know it's not, that's great.But in the mean time, can anyone suggest a free one?

  6. Alright, so I'm looking for a decent script editor. Preferably for PHP, but a JavaScript editor would come in handy as well.What I'm looking for in this editor is:-Code Hints(Like in Flash how it gives you a hint on how to use the function/object)-Code Check(Like in Flash how code turns blue when understood)-Line Number(What line you are typing on in the document)-Export Features(Save with any file extension)-Any other features would be niceIf I'm being too specific then just give me the nearest one to my description that you've got. NotePad works great, but I'd like my load to be a bit easier, and I won't have as many problems.Oops, I noticed that I posted this in the wrong forum, I meant to post it in general, can a mod move it?

  7. Wait, I had another error. It worked for awhile and then something happened, another parse error.Here's login.php

    <?php$uname = $_POST['uname'];$pword = $_POST['pword'];if(isset($_COOKIE['user']) && $pword == "bobville"){$loginText = "You are already logging in.<br /><a href='index.php'>Return to the Main Page.</a>";}else if($pword == "bobville" && !isset($_COOKIE['user'])){setcookie("user", $uname, time()+360000);$loginText = "You've been successfully logged in, ".$_COOKIE['user'].", <a href='index.php'>Return to the Main Page.</a>";}else{$loginText = "Your password is incorrect, please try again.";}?><?phpif(isset($_COOKIE['user'])){$loginDisplay = "Welcome back,".$_COOKIE['user']."<br /><div class='menu'><a href='accountinfo.php'>Account Info</a><br /><a href='updateprofile.php'>Update Profile</a></div><br />";}else{$loginDisplay = "You are not logged in, <br />Please go to the home page.";?><html><head><link rel='stylesheet' type='text/css' href='style.css'><title>!!Bobville Online!!</title><script type='text/javascript'>function addAdmin(adName){document.getElementById("update").innerHTML += "Posted By "+adName+".";}function sigWeek(theSig){document.getElementById("sigDisplay").src ="images/sotw/"+theSig+".gif";}</script></head><body><object width='980' height='150'><param name='banner'><embed src='banner.swf' width='980' height='150'></embed></object><br /><table cellspacing ='0'><tr><td width='210'><?phpinclude("menu.php");?></td><td width='580'><?phpinclude("sotw_content.php");?><br /><div class='maintitle' align='center'><div class='valign'>Logging In</div></div><br /><p id='update'><?phpecho $loginText;?></p></td><td width='210'><?php echo $loginDisplay;?></form></td></tr></table></body></html>

    Here's the error.

    Parse error: parse error, unexpected $ in /www/9999mb.com/b/o/b/bobville/htdocs/login.php on line 80

  8. Good luck. I think it says that XHTML is actually going to replace HTML in the next couple of versions, so I better get moving too!CSS is a pretty simple lagnuage to learn, but using it to it's extent and matching it to your site can be the hard part.

  9. On my site, I'm going to make a log in system, but right now you just set a cookie when you log in, but I'm causing errors. Can you help me?Here is my site.http://bobville.9999mb.com/test.phpbobville is the password to the log in.Here's the code for test.php

    <html><head><link rel='stylesheet' type='text/css' href='style.css'><title>!!Bobville Online!!</title><script type='text/javascript'>function addAdmin(adName){document.getElementById("update").innerHTML += "Posted By "+adName+".";}function sigWeek(theSig){document.getElementById("sigDisplay").src ="images/sotw/"+theSig+".gif";}</script></head><body onload='addAdmin("Jud")'><object width='980' height='150'><param name='banner'><embed src='banner.swf' width='980' height='150'></embed></object><br /><table cellspacing ='0'><tr><td width='210'><?phpinclude("menu.php");?></td><td width='580'><table cellspacing='0'><tr><td width='140'><input type='button' id='normalButton' value='SOTW #1' name='SOTW1' onclick='sigWeek(1)'><br /><input type='button' id='normalButton' value='SOTW #2' name='SOTW2' onclick='sigWeek(2)'><br /><input type='button' id='normalButton' value='SOTW #3' name='SOTW3' onclick='sigWeek(3)'><br /></td><td width='300'><img src='images/sotw/1.gif' id='sigDisplay' width='300' height='100'></td><td width='140'><input type='button' id='normalButton' value='SOTW #4' name='SOTW4' onclick='sigWeek(4)'><br /><input type='button' id='normalButton' value='SOTW #5' name='SOTW5' onclick='sigWeek(5)'><br /><input type='button' id='normalButton' value='SOTW #6' name='SOTW6' onclick='sigWeek(6)'><br /></td></tr></table><br /><div class='maintitle' align='center'><div class='valign'>Update #1</div></div><br /><p id='update'>Hello, and welcome to the Bobville Homepage.<br />Currently, it's still under construction and we need some time to build it.<br />Check back later.<br /></p></td><td width='210'><?php if(isset($_COOKIE['user'])){echo "Welcome back,".$_COOKIE['user']."<br /><div class='menu'><a href='accountinfo.php'>Account Info</a><br /><a href='updateprofile.php'>Update Profile</a></div><br />";}else{echo "<form method='post' action='login.php'>Username:<br /><input type='text' id='uname' name='uname' value='uname'><br />Password:<br /><input type='password' id='pword' name='pword' value='pword'><br /><input type='submit' id='normalButton' onSubmit='checkForm()' value='Log in'>";}?></form></td></tr></table></body></html>

    And here is the code for login.php which the form directs to.

    <html><head><link rel='stylesheet' type='text/css' href='style.css'><title>!!Bobville Online!!</title><script type='text/javascript'>function addAdmin(adName){document.getElementById("update").innerHTML += "Posted By "+adName+".";}function sigWeek(theSig){document.getElementById("sigDisplay").src ="images/sotw/"+theSig+".gif";}</script></head><body><object width='980' height='150'><param name='banner'><embed src='banner.swf' width='980' height='150'></embed></object><br /><table cellspacing ='0'><tr><td width='210'><?phpinclude("menu.php");?></td><td width='580'><table cellspacing='0'><tr><td width='140'><input type='button' id='normalButton' value='SOTW #1' name='SOTW1' onclick='sigWeek(1)'><br /><input type='button' id='normalButton' value='SOTW #2' name='SOTW2' onclick='sigWeek(2)'><br /><input type='button' id='normalButton' value='SOTW #3' name='SOTW3' onclick='sigWeek(3)'><br /></td><td width='300'><img src='images/sotw/1.gif' id='sigDisplay' width='300' height='100'></td><td width='140'><input type='button' id='normalButton' value='SOTW #4' name='SOTW4' onclick='sigWeek(4)'><br /><input type='button' id='normalButton' value='SOTW #5' name='SOTW5' onclick='sigWeek(5)'><br /><input type='button' id='normalButton' value='SOTW #6' name='SOTW6' onclick='sigWeek(6)'><br /></td></tr></table><br /><div class='maintitle' align='center'><div class='valign'>Logging In</div></div><br /><p id='update'><?php$uname = $_POST['uname'];$pword = $_POST['pword'];if(isset($_COOKIE['user']) && $pword == "bobville"){echo "You are already logging in.<br /><a href='index.php'>Return to the Main Page</a>";}else if($pword == "bobville" && !isset($_COOKIE['user'])){setcookie("user", $uname, time()+360000);}else{echo "Your password is incorrect, please try again.";}?></p></td><td width='210'><?php if(isset($_COOKIE['user'])){echo "Welcome back,".$_COOKIE['user']."<br /><div class='menu'><a href='accountinfo.php'>Account Info</a><br /><a href='updateprofile.php'>Update Profile</a></div><br />";}?></form></td></tr></table></body></html>

    And here is the error that displays on my login.php if you get the correct password and set the cookie.

    Warning: Cannot modify header information - headers already sent by (output started at /www/9999mb.com/b/o/b/bobville/htdocs/login.php:7) in /www/9999mb.com/b/o/b/bobville/htdocs/login.php on line 60

    What is this problem and how do I fix this?

×
×
  • Create New...