-
Posts
403 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Sniffy
-
-
Search the loadVars() function.I never used it, so I can't really give an example, but you'll probably need 3 files..swf, .php & .txt
-
Maybe:But this would not be between 4 and 7, it would be 1 - 100; I would personally go with the above way.randomNum = int(random(100);gotoAndStop(randomNum);
-
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.
-
-
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+"."); }}
-
Thanks, but can Boen Robot explain his version to me. I'm not too up on the uses of arrays and I don't know what \r means.
-
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?
-
Yes, I learned something too.I never thought of a way to use the increment/decrement operators before the the number yet, so now I know of one way. Thanks, for posting the question!
-
http://www.w3schools.com/js/tryit.asp?file...ocument_getbyidIs an example.Also, there's something similar: getElementsByTagName();
-
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?
-
Just for myself to know, how is this done?Is it as simple as me just declaring the variable outside of the function?
-
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?
-
It seems to work, but I'll inform you on things if they go wrong.
-
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
-
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.
-
Yeah, I didn't think he was wrong, but I didn't know how to fix it either. I guess you are quite knowledgable of flash.
-
I'd never be able to figure that out. It just shows that I'm a PHP newbie and there's nothing I can do about it. Good Job.
-
Oh, stupid me.Thanks, a lot, if there's any problems I'll tell you.
-
What, could explain it more thouroughly to me and maybe give me an example code?I need a way to set a cookie through POST data, so is there an alternative way?
-
Wait nevermind, I fixed the addAdmin function, but can somebody answer my other problem?
-
Of course not, we're discussing parent directories.
-
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?
-
Thanks, guys.
-
I was wondering how I could access a file in a parent directory in an html anchor?Or for instance, say my stylesheet is in the parent directory and I'm in sub-directory "users", what code would I use to access it?
Html forms vs downloading forms
in HTML/XHTML
Posted
If all user's are using Outlook, which I doubt, then mailto: would do.In most cases though, it's better to use the PHP mail() function.Look it up in the w3schools PHP tutorial.