Jump to content

Kaylub

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Everything posted by Kaylub

  1. But..... I don't need to. Isn't that like saying "One day a banana may turn your car on, so you'd better always have a banana with you"?
  2. The echo is being removed, it's simply there for visual confirmation on the html side for now. It doesn't actually pass any data for computer crunching. It would seem globalizing things worked on this praticular script, and it also seems like a very easy answer to me. Why mess around with returns/data dumps?
  3. REVISED CODE: Works Now (for Commons only, but the formula is there for others. Will update others in 5-10mins) <?php // PHP FUNCTIONS // function RaceCheck($StarterPackGroup) { if ($StarterPackGroup=="AquaElves") { AquaElfStarterPack(); } } function AquaElfStarterPack() { $i=0; echo "<p><b>Commons:</b><br>"; while ($i < 9) { $i=$i + 1; if ($GLOBALS["CommonUnit"][$i] <= 20) { $OpenedCommon[$i] = "Trooper"; } else if ($GLOBALS["CommonUnit"][$i] <= 40) { $OpenedCommon[$i] = "Bowman"; } else if ($GLOBALS["CommonUnit"][$i] <= 65) { $OpenedCommon[$i] = "Sentinal"; } else if ($GLOBALS["CommonUnit"][$i] <= 80) { $OpenedCommon[$i] = "Horseman"; } else if ($GLOBALS["CommonUnit"][$i] <= 100) { $OpenedCommon[$i] = "Evoker"; } echo "" . $GLOBALS["CommonUnit"][$i] . " "; echo "" . $OpenedCommon[$i] . "<br>"; } echo "</p><p><b>Uncommons:</b><br>"; $i=0; while ($i < 4) { $i=$i + 1; if ($UncommonUnit[$i] <= 20) { $OpenedUncommon[$i] = "Hero"; } else if ($UncommonUnit[$i] <= 40) { $OpenedUncommon[$i] = "Archer"; } else if ($UncommonUnit[$i] <= 65) { $OpenedUncommon[$i] = "Courier"; } else if ($UncommonUnit[$i] <= 85) { $OpenedUncommon[$i] = "Knight"; } else if ($UncommonUnit[$i] <= 100) { $OpenedUncommon[$i] = "Conjurer"; } echo "" . $UncommonUnit[$i] . " "; echo "" . $OpenedUncommon[$i] . "<br>"; } echo "</p><p><b>Rares:</b><br>"; $i=0; while ($i < 2) { $i=$i + 1; if ($RareUnit[$i] <= 15) { $OpenedRare[$i] = "Champion"; } else if ($RareUnit[$i] <= 35) { $OpenedRare[$i] = "Sharp Shooter"; } else if ($RareUnit[$i] <= 55) { $OpenedRare[$i] = "Herald"; } else if ($RareUnit[$i] <= 80) { $OpenedRare[$i] = "Eagle Knight"; } else if ($RareUnit[$i] <= 100) { $OpenedRare[$i] = "Enchanter"; } echo "" . $RareUnit[$i] . " "; echo "" . $OpenedRare[$i] . "<br>"; } echo "</p><p><b>Monster:</b><br>"; if ($MonsterUnit <= 25) { $OpenedMonster = "Skeleton Sprite"; } else if ($MonsterUnit <= 45) { $OpenedMonster = "Tako"; } else if ($MonsterUnit <= 75) { $OpenedMonster = "Coral Giant"; } else if ($MonsterUnit <= 100) { $OpenedMonster = "Gryphon"; } echo "" . $MonsterUnit . " "; echo "" . $OpenedMonster . "</p>"; } // GLOBAL PHP BODY // $i = 0; while ($i < 9) { $i = $i + 1; $CommonUnit[$i] = rand(1, 100); echo "" . $CommonUnit[$i] . " "; } $i = 0; while ($i < 4) { $i = $i + 1; $UncommonUnit[$i] = rand(1, 100); } $i = 0; while ($i < 2) { $i = $i + 1; $RareUnit[$i] = rand(1, 100); } $MonsterUnit = rand(1, 100); RaceCheck($_REQUEST['StarterPackGroup']); ?>
  4. Do I need to be using 'return' here in some fashion? I don't know much about it.
  5. Hey all, I've been programming with php for about 3 months now and am still out to lunch on a lot of it. I was hoping someone could help me clear up a problem I'm having with my script. It's a simple script that takes a user selection from the previous page ($StarterPackGroup) and executes a list of randomized functions based on the users selection. (There are 4 races to choose from, here's the url to the page that provides the info for $StarterPackGroup for my script. http://www.eardrumvalley.com/backdoor/MINI_TACTICS/Starter_Pack.php Once the user has selected one of 4 races, it takes them to this php script and rolls for their first "pack". I currently only have the "aqua elves" responding, so click on them. Now, I have the page setup so it generates random numbers, and I know the numbers ARE generating, because I see them with an echo command (you will too, they are at the top of the page). However, the problem I'm having, is trying to utilize these random generated numbers in my other functions. ie: I create $UncommonUnit[$i], $CommonUnit[$i], $RareUnit[$i] and $MonsterUnit in the NewStarterPackRoll function.... however, i can't seem to utilize them in my other functions. How do I pass this info to another function? The echo returns the random numbers from $CommonUnit, $UncommonUnit, $RareUnit and $MonsterUnit just fine WITHIN the StarterPackRoll function, but not later on in the AquaElfStarterPack function. Anytime I try to echo the return value of these holders, I get a blank value... I also know the value isn't being passed between functions because none of my if statements are working either. All the units receive a default allocation (Trooper, Hero, Champion, Skel Sprite), if the randomized numbers were passing, these would be giving me other values as well. Please help, I'm convinced there's a simple answer, and I'm just an idiot when it comes to PHP. Lend me a hand! CODING INFO ----------------- THE DATE ENTREE SCREEN - "http://www.eardrumvalley.com/backdoor/MINI_TACTICS/Starter_Pack.php" (BE SURE TO PICK AQUA ELVES, THEY ARE THE ONLY RACE THAT SENDS VALUES) This will bring you to the script page after you submit the selection: THE SCRIPT CODE ON "Open_First_Pack.php" after the data is sent is as follows: (please browse to webpages to see results of code). <?php function RaceCheck($StarterPackGroup) { if ($StarterPackGroup=="AquaElves") { AquaElfStarterPack(); } } function NewStarterPackRoll() { $i = 0; while ($i < 9) { $i = $i + 1; $CommonUnit[$i] = rand(1, 100); echo "" . $CommonUnit[$i] . " "; } $i = 0; while ($i < 4) { $i = $i + 1; $UncommonUnit[$i] = rand(1, 100); } $i = 0; while ($i < 2) { $i = $i + 1; $RareUnit[$i] = rand(1, 100); } $MonsterUnit = rand(1, 100); } function AquaElfStarterPack() { $i=0; echo "<p><b>Commons:</b><br>"; while ($i < 9) { $i=$i + 1; if ($CommonUnit[$i] <= 20) { $OpenedCommon[$i] = "Trooper"; } else if ($CommonUnit[$i] <= 40) { $OpenedCommon[$i] = "Bowman"; } else if ($CommonUnit[$i] <= 65) { $OpenedCommon[$i] = "Sentinal"; } else if ($CommonUnit[$i] <= 80) { $OpenedCommon[$i] = "Horseman"; } else if ($CommonUnit[$i] <= 100) { $OpenedCommon[$i] = "Evoker"; } echo "" . $CommonUnit[$i] . " "; echo "" . $OpenedCommon[$i] . "<br>"; } echo "</p><p><b>Uncommons:</b><br>"; $i=0; while ($i < 4) { $i=$i + 1; if ($UncommonUnit[$i] <= 20) { $OpenedUncommon[$i] = "Hero"; } else if ($UncommonUnit[$i] <= 40) { $OpenedUncommon[$i] = "Archer"; } else if ($UncommonUnit[$i] <= 65) { $OpenedUncommon[$i] = "Courier"; } else if ($UncommonUnit[$i] <= 85) { $OpenedUncommon[$i] = "Knight"; } else if ($UncommonUnit[$i] <= 100) { $OpenedUncommon[$i] = "Conjurer"; } echo "" . $UncommonUnit[$i] . " "; echo "" . $OpenedUncommon[$i] . "<br>"; } echo "</p><p><b>Rares:</b><br>"; $i=0; while ($i < 2) { $i=$i + 1; if ($RareUnit[$i] <= 15) { $OpenedRare[$i] = "Champion"; } else if ($RareUnit[$i] <= 35) { $OpenedRare[$i] = "Sharp Shooter"; } else if ($RareUnit[$i] <= 55) { $OpenedRare[$i] = "Herald"; } else if ($RareUnit[$i] <= 80) { $OpenedRare[$i] = "Eagle Knight"; } else if ($RareUnit[$i] <= 100) { $OpenedRare[$i] = "Enchanter"; } echo "" . $RareUnit[$i] . " "; echo "" . $OpenedRare[$i] . "<br>"; } echo "</p><p><b>Monster:</b><br>"; if ($MonsterUnit <= 25) { $OpenedMonster = "Skeleton Sprite"; } else if ($MonsterUnit <= 45) { $OpenedMonster = "Tako"; } else if ($MonsterUnit <= 75) { $OpenedMonster = "Coral Giant"; } else if ($MonsterUnit <= 100) { $OpenedMonster = "Gryphon"; } echo "" . $MonsterUnit . " "; echo "" . $OpenedMonster . "</p>"; } NewStarterPackRoll(); RaceCheck($_REQUEST['StarterPackGroup']); ?>
  6. Update: Figured it out. Man, it's been a long day. It was in my last "if"/"while" statement: I accidentally had the do/while statement restriping FifthNetworkNum with data instead of SixthNetworkNum when SixthNetworkNum was == to the other "$NetworkNums". So yea, when the SixthNetworkNum would be equal to the others, it wasn't being rearranged. It would just throw the computer into an infinite loop. This is also why it was only occuring occasionally. Here's the faulty code I'm talking about: " if ($TotalNetworkNums > 5) { $SixthNetworkNum = rand (1, $TotalNetworkNums); do { // 'Here was the problem, from here.' $FifthNetworkNum = rand (1, $TotalNetworkNums); // 'To here.' } while (($FirstNetworkNum==$SixthNetworkNum) || ($SecondNetworkNum==$SixthNetworkNum) || ($ThirdNetworkNum==$SixthNetworkNum) || ($FourthNetworkNum==$SixthNetworkNum) || ($FifthNetworkNum==$SixthNetworkNum)); } echo "" . $FirstNetworkNum . " " . $SecondNetworkNum . " " . $ThirdNetworkNum . " " . $FourthNetworkNum . " " . $FifthNetworkNum . " " . $SixthNetworkNum . " "; fclose($fh);
  7. Thanks for the reply, but I already considered that. It doesn't appear to be the problem though. I removed all the other while statements from the code, but left that one in and tested it. It comes up fine every time, with no infinite loop problems. Also, if that was the problem, wouldn't it create an infinite loop EVERY time? I believe it's in the || (or) statements, which is why it's only occurring from time to time. Does this not seem like a logical train of that? That and the code works with the ZeroHolder while statement. heh (Using an undefined variable always results in the result of an absolute zero. This is handy when trimming for string comparisons). Again, thanks for the reply. But keep 'em coming, this one still ain't solved.
  8. I need a bit of help. I'm at the end of my rope for the night. I'm a total noob when it comes to programming, and i'm trying to make a bit of a complex randomizer generate 6 unique numbers for me. For some reason, this simple randomize code throws my html browser into an infinite loop every now and then. It's weird, because most of the time it works, but every now and then the while statements are causing it to hit an infinite loop, (which is obviously no code). Can someone help me find where the problem is stemming from? Code: <?php function NetworkInfo ($textfieldUsername) { $myFile = "../../USER_INFO/" . $textfieldUsername . "-Network.txt"; $fh = fopen($myFile, 'r'); $Gate = "__"; while (strcmp(trim($Gate),trim($ZeroHolder)) <> 0) { $counter = $counter + 1; $Gate = fgets($fh); } $TotalNetworkNums = $counter - 1; if ($TotalNetworkNums > 0) { $FirstNetworkNum = rand (1, $TotalNetworkNums); } if ($TotalNetworkNums > 1) { $SecondNetworkNum = rand (1, $TotalNetworkNums); do { $SecondNetworkNum = rand (1, $TotalNetworkNums); } while ($SecondNetworkNum==$FirstNetworkNum); } if ($TotalNetworkNums > 2) { $ThirdNetworkNum = rand (1, $TotalNetworkNums); do { $ThirdNetworkNum = rand (1, $TotalNetworkNums); } while (($FirstNetworkNum==$ThirdNetworkNum) || ($SecondNetworkNum==$ThirdNetworkNum)); } if ($TotalNetworkNums > 3) { $FourthNetworkNum = rand (1, $TotalNetworkNums); do { $FourthNetworkNum = rand (1, $TotalNetworkNums); } while (($FirstNetworkNum==$FourthNetworkNum) || ($SecondNetworkNum==$FourthNetworkNum) || ($ThirdNetworkNum==$FourthNetworkNum)); } if ($TotalNetworkNums > 4) { $FifthNetworkNum = rand (1, $TotalNetworkNums); do { $FifthNetworkNum = rand (1, $TotalNetworkNums); } while (($FirstNetworkNum==$FifthNetworkNum) || ($SecondNetworkNum==$FifthNetworkNum) || ($ThirdNetworkNum==$FifthNetworkNum) || ($FourthNetworkNum==$FifthNetworkNum)); } if ($TotalNetworkNums > 5) { $SixthNetworkNum = rand (1, $TotalNetworkNums); do { $FifthNetworkNum = rand (1, $TotalNetworkNums); } while (($FirstNetworkNum==$SixthNetworkNum) || ($SecondNetworkNum==$SixthNetworkNum) || ($ThirdNetworkNum==$SixthNetworkNum) || ($FourthNetworkNum==$SixthNetworkNum) || ($FifthNetworkNum==$SixthNetworkNum)); } echo "" . $FirstNetworkNum . " " . $SecondNetworkNum . " " . $ThirdNetworkNum . " " . $FourthNetworkNum . " " . $FifthNetworkNum . " " . $SixthNetworkNum . " "; fclose($fh); } NetworkInfo ($_REQUEST['textfieldUsername']);
  9. Can no one answer this? Is my programming far to stupid? heh
  10. Sorry, I'm not an experienced programmer at all and am having some troubles with a simple piece of code. For some reason the echo never fires off. I know the $'s are correct, because when I test them with an echo outside of the if statement, they both return the correct value. How come I can't get them to compare eachother using an if statement? Could anyone tell me why this piece of code isn't working: " <?php function NameChecker ($textfieldUserNameSignUp) { $theData = "Initialize"; $myFile = "../../USER_INFO/USERNAMES.txt"; $fh = fopen($myFile, 'r'); while ($theData <> "") { $theData = fgets($fh); if ($theData==$textfieldUserNameSignUp) { echo "Match!";} } fclose($fh);} NameChecker ($_REQUEST['textfieldUserNameSignUp']); ?> " Thanks for helping a noob.
  11. Is it possible to change the value of a csaction using javascript? I'm trying to change the link value of a new window when the csaction opens the new window. My csaction looks like this: <csactions> <csaction name="186f68c67" class="Open Window" type="onevent" val0="../../USER_DOWNLOADS/Recording%20Artists%20Manual%20E.mpg" val1="_blank" val2="800" val3="600" val4="true" val5="true" val6="true" val7="true" val8="true" val9="true" val10="true" urlparams="1"></csaction> </csactions> <csscriptdict import="import"> <script type="text/javascript" src="../../css/CSScriptLib.js"></script> </csscriptdict> <csactiondict> <script type="text/javascript"><!-- CSAct[/*CMP*/ '186f68c67'] = new Array(CSOpenWindow,/*URL*/ '../../USER_DOWNLOADS/Recording%20Artists%20Manual%20E.mpg','_blank',800,600,true,true,true,true,true,true,true); So anyways, I was wondering, is it possible to change the link location using a javascript function I could call when the user mouses over the button depending on the value of "infoReady"? I know this is completely wrong, but is ANYTHING at all like the following possible?: Or does anyone have another idea? Here's the example i had in mind, (the incorrect one, but the one I'm using as an example of what I'm trying to accomplish). function MovieChooser() { var Navigator=document.formRegister.infoReady.value if (Navigator=="RAYes") { document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_A.mpg";} if (Navigator=="RANo1") { document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_B.mpg";} if (Navigator=="RANo2") { document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_C.mpg";} if (Navigator=="RANo3") { document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_D.mpg";} if (Navigator=="RANo4") { document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_E.mpg";} if (Navigator=="RANo5") { document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_F.mpg";} if (Navigator=="RANo6") { document.csaction.186f68c67.val0 = "../../USER_DOWNLOADS/RecordingManual_G.mpg";} }
  12. Here is the code for the entire page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <meta name="generator" content="Adobe GoLive" /> <title>The Eardrum Valley Community</title> <link href="../../css/forphp.css" rel="stylesheet" type="text/css" media="all" /> <style type="text/css" media="screen"><!-- .formbutton{ cursor:pointer; border:outset 1px #000; background:#f30000; color:#fff; font-family:Helvetica; font-size:10pt; font-weight:bold; padding:1px 2px; } #positions { height: 130px; width: 210px; left: 860px; top: 280px; position: absolute; visibility: hidden; } --></style> <csactions> <csaction name="81eee020" class="ShowHide" type="onevent" val0="positions" val1="1"></csaction> <csaction name="829c5723" class="ShowHide" type="onevent" val0="positions" val1="0"></csaction> <csaction name="826d4822" class="ShowHide" type="onevent" val0="positions" val1="1"></csaction> <csaction name="999f4565" class="ShowHide" type="onevent" val0="positions" val1="0"></csaction> <csaction name="999f4567" class="ShowHide" type="onevent" val0="positions" val1="0"></csaction> <csaction name="999f4569" class="ShowHide" type="onevent" val0="positions" val1="1"></csaction> <csaction name="999f5471" class="ShowHide" type="onevent" val0="positions" val1="0"></csaction> </csactions> <csscriptdict import="import"> <script type="text/javascript" src="../../css/CSScriptLib.js"></script> </csscriptdict> <csactiondict> <script type="text/javascript"><!-- CSAct[/*CMP*/ '81eee020'] = new Array(CSShowHide,/*CMP*/ 'positions',1); CSAct[/*CMP*/ '829c5723'] = new Array(CSShowHide,/*CMP*/ 'positions',0); CSAct[/*CMP*/ '826d4822'] = new Array(CSShowHide,/*CMP*/ 'positions',1); CSAct[/*CMP*/ '999f4565'] = new Array(CSShowHide,/*CMP*/ 'positions',0); CSAct[/*CMP*/ '999f4567'] = new Array(CSShowHide,/*CMP*/ 'positions',0); CSAct[/*CMP*/ '999f4569'] = new Array(CSShowHide,/*CMP*/ 'positions',1); CSAct[/*CMP*/ '999f5471'] = new Array(CSShowHide,/*CMP*/ 'positions',0); var preloadFlag = false; function preloadImages() { if (document.images) { pre_movie_on = newImage('../../IMG/SIGNUPPAGE/movie_on.png'); pre_pdf_on = newImage('../../IMG/SIGNUPPAGE/pdf_on.png'); pre_html_on = newImage('../../IMG/SIGNUPPAGE/html_on.png'); preloadFlag = true; } } // --></script> </csactiondict> <script type="text/javascript"><!-- function PositionValue() { var searchInteger, searchString testInteger=document.formRegister.selectPosition2.selectedIndex testString=document.formRegister.selectPosition2.options[testInteger].text if (testInteger=document.formRegister.selectPosition2.options[0].selected) { document.formRegister.infoPosition2.value = "Recording Artist";} else { document.formRegister.infoPosition2.value = testString } } function PositionCheck() { var Navigator=document.formRegister.infoPosition2.value if (Navigator=="Recording Artist") { document.formRegister.action = "RecordingArtist2.php";} if (Navigator=="Song Writer") { document.formRegister.action = "SongWriter2.php";} if (Navigator=="Audio Engineer") { document.formRegister.action = "AudioEngineer2.php";} if (Navigator=="Art Director") { document.formRegister.action = "ArtDirector2.php";} if (Navigator=="Talent Scout") { document.formRegister.action = "TalentScout2.php";} if (Navigator=="Band Manager") { document.formRegister.action = "BandManager2.php";} if (Navigator=="A&R Agent") { document.formRegister.action = "AandRAgent2.php";} } function GotTutorial() { document.formRegister.submitAnotherPosition.style="display:inline"; document.formSkip.style="display:inline"; } //--> </script> </head> <style> body { background-repeat: no-repeat; } </style> <body onload="preloadImages();" background="../../IMG/LOGINPAGE/loginbg.jpg"> <div align="center"> <table width="924" border="0" cellspacing="0" cellpadding="0" height="430"> <tr align="left" valign="top" height="80"> <td align="left" valign="top" width="462" height="80"> <div align="left"> <img src="../../IMG/SIGNUPPAGE/logo.png" alt="" height="69" width="70" align="top" border="0" /> <img src="../../IMG/LOGINPAGE/eardrumvalleymonochre.png" alt="" height="72" width="290" border="0" /></div> </td> <td align="right" valign="top" width="462" height="80"> <div align="right"> <table width="462" border="0" cellspacing="0" cellpadding="0" height="76"> <tr align="right" valign="top" height="25"> <td align="right" valign="top" width="392" height="25"> <div align="right"> <font size="4" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>Register as a Recording Artist</strong></font></div> </td> <td rowspan="2" align="right" valign="top" width="70" height="62"> <div align="right"> <img src="../../IMG/SIGNUPPAGE/RecordingArtistEmblem.png" alt="" height="62" width="59" border="0" /></div> </td> </tr> <tr align="right" valign="top" height="31"> <td align="right" valign="top" width="392" height="31"><?php function new_account ($infoUserName, $infoLocation, $infoCity) { echo "" . $infoUserName . "<br>"; echo "" . $infoCity . ", " . $infoLocation . "<br>"; } new_account ($_REQUEST['infoUserName'], $_REQUEST['infoLocation'], $_REQUEST['infoCity']); ?></td> </tr> </table> </div> </td> </tr> <tr align="left" height="357"> <td align="center" valign="middle" width="462" height="357"> <table width="462" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3" width="462"> <div align="left"> <font size="3" color="#a00000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>We have assessed your answers and prepared your personalized tutorial package. This tutorial is unique to your profile and will walk you through the process of getting setup/preparing your tracks for an audio engineer. </strong></font> <p align="center"><font size="3" color="#a00000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>Choose 1 of the 3 download options below</strong></font></p> </div> <div align="center"> <p><img src="../../IMG/SIGNUPPAGE/download.png" alt="" height="70" width="70" border="0" /></p> </div> </td> </tr> <tr align="center" valign="middle" height="83"> <td width="154" height="83"> <div align="center"> <a onclick="changeImages('movie_off','../../IMG/SIGNUPPAGE/movie_on.png');" onmousedown="changeImages('movie_off','../../IMG/SIGNUPPAGE/movie_off.png');return true" onmouseover="changeImages('movie_off','../../IMG/SIGNUPPAGE/movie_on.png');return true" onmouseout="changeImages('movie_off','../../IMG/SIGNUPPAGE/movie_off.png');return true" href="#"><img id="movie_off" onclick="GotTutorial()" src="../../IMG/SIGNUPPAGE/movie_off.png" alt="" name="movie_off" height="83" width="66" border="0" /></a></div> </td> <td width="154" height="83"> <div align="center"> <a onclick="changeImages('pdf_off','../../IMG/SIGNUPPAGE/pdf_on.png');" onmousedown="changeImages('pdf_off','../../IMG/SIGNUPPAGE/pdf_off.png');return true" onmouseover="changeImages('pdf_off','../../IMG/SIGNUPPAGE/pdf_on.png');return true" onmouseout="changeImages('pdf_off','../../IMG/SIGNUPPAGE/pdf_off.png');return true" href="#"><img id="pdf_off" onclick="GotTutorial()" src="../../IMG/SIGNUPPAGE/pdf_off.png" alt="" name="pdf_off" height="70" width="70" border="0" /></a></div> </td> <td align="center" valign="middle" width="154" height="83"> <div align="center"> <a onclick="changeImages('html_off','../../IMG/SIGNUPPAGE/html_on.png');" onmousedown="changeImages('html_off','../../IMG/SIGNUPPAGE/html_off.png');return true" onmouseover="changeImages('html_off','../../IMG/SIGNUPPAGE/html_on.png');return true" onmouseout="changeImages('html_off','../../IMG/SIGNUPPAGE/html_off.png');return true" href="#"><img id="html_off" onclick="GotTutorial()" src="../../IMG/SIGNUPPAGE/html_off.png" alt="" name="html_off" height="70" width="70" border="0" /></a></div> </td> </tr> <tr> <td width="154"> <div align="center"> <font color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>.MPG download<br /> </strong></font><font size="2" color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>(animated</strong></font><br /> <font size="2" color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong> instructions)</strong></font></div> </td> <td width="154"> <div align="center"> <font color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">.PDF download<br /> </font><font size="2" color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">(illustrated</font><br /> <font size="2" color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"> instructions)</font></div> </td> <td width="154"> <div align="center"> <font color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">.HTML Bookmark<br /> </font><font size="2" color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">(for less</font><br /> <font size="2" color="#830000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"> disk space)</font></div> </td> </tr> </table> </td> <td valign="middle" width="462" height="357"> <div align="center"> <form action="(EmptyReference!)" name="formRegister" target="_parent"> <table width="462" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="30"> <div id="positions" onmouseout="CSAction(new Array(/*CMP*/'999f4565'));" csout="999f4565"> <div align="center"> <select onclick="CSAction(new Array(/*CMP*/'999f4567'));return CSClickReturn()" onchange="PositionValue(), PositionCheck()" onmouseover="CSAction(new Array(/*CMP*/'999f4569'));return true;" onmouseout="CSAction(new Array(/*CMP*/'999f5471'));" name="selectPosition2" size="7" csclick="999f4567" csout="999f5471" csover="999f4569"> <option value="Recording Artist">Recording Artist</option> <option value="Song Writer">Song Writer</option> <option value="Audio Engineer">Audio Engineer</option> <option value="Talent Scout">Talent Scout</option> <option value="Art Director">Art Director</option> <option value="A&R Agent">A&R Agent</option> <option value="Band Manager">Band Manager</option> </select></div> </div> <input type="text" style="display:none" name="infoTwitter" value='<?php function twitterstore ($infoTwitter) { echo "" . $infoTwitter . ""; } twitterstore ($_REQUEST['infoTwitter']);?>' size="1" /><input type="text" style="display:none" name="infoGenre2" value='<?php function genres2store ($infoGenre2) { echo "" . $infoGenre2 . ""; } genres2store ($_REQUEST['infoGenre2']);?>' size="1" /></td> <td align="left" width="432"> <div align="right"> <strong><font size="4" color="#a00000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Would you like to register another position?<br /> </font></strong><font size="3" color="#a00000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Perhaps you'd also like to be an audio engineer, song writer AND audio engineer all at the same time.</font><br /> <font size="3" color="#a00000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Users can register up to 3 community positions.</font><br /> <font size="1" color="#a00000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">(or get started now with the info you've provided!)</font></div> </td> </tr> </table> <table width="462" border="0" cellspacing="0" cellpadding="0"> <tr height="20"> <td colspan="3" height="20"> <div align="right"> <input type="text" style="display:none" name="infoPosition1" value='<?php function position1store ($infoPosition1) { echo "" . $infoPosition1 . ""; } position1store ($_REQUEST['infoPosition1']);?>' size="1" /><input type="text" style="display:none" name="infoLocation" value='<?php function locationstore ($infoLocation) { echo "" . $infoLocation . ""; } locationstore ($_REQUEST['infoLocation']);?>' size="1" /><input type="text" style="display:none" name="infoEmailAddress" value='<?php function emailstore ($infoEmailAddress) { echo "" . $infoEmailAddress . ""; } emailstore ($_REQUEST['infoEmailAddress']);?>' size="1" /><input type="text" style="display:none" name="infoGenre1" value='<?php function genres1store ($infoGenre1) { echo "" . $infoGenre1 . ""; } genres1store ($_REQUEST['infoGenre1']);?>' size="1" /><img src="../../IMG/LOGINPAGE/line.jpg" alt="" height="1" width="350" border="0" /></div> </td> </tr> <tr height="30"> <td colspan="3" height="30"> <div align="right"> <input type="text" style="display:none" name="infoPassword" value='<?php function passwordstore ($infoPassword) { echo "" . $infoPassword . ""; } passwordstore ($_REQUEST['infoPassword']);?>' size="1" /><input type="text" style="display:none" name="infoUserName" value='<?php function namestore ($infoUserName) { echo "" . $infoUserName . ""; } namestore ($_REQUEST['infoUserName']);?>' readonly="readonly" size="1" /><input type="text" style="display:none" name="infoMyspace" value='<?php function myspacestore ($infoMyspace) { echo "" . $infoMyspace . ""; } myspacestore ($_REQUEST['infoMyspace']);?>' size="1" /><input type="text" style="display:none" name="infoReady" value='<?php function readystore ($infoReady) { echo "" . $infoReady . ""; } readystore ($_REQUEST['infoReady']);?>' size="1" /><input type="text" style="display:none" name="infoGenre3" value='<?php function genres3store ($infoGenre3) { echo "" . $infoGenre3 . ""; } genres3store ($_REQUEST['infoGenre3']);?>' size="1" /><input type="text" style="display:none" name="infoCity" value='<?php function citystore ($infoCity) { echo "" . $infoCity . ""; } citystore ($_REQUEST['infoCity']);?>' size="1" /><input type="text" style="display:none" name="infoInstruments" value='<?php function instrumentstore ($infoInstruments) { echo "" . $infoInstruments . ""; } instrumentstore ($_REQUEST['infoInstruments']);?>' size="1" /><input type="text" style="display:none" name="infoBands" value='<?php function bandsstore ($infoBands) { echo "" . $infoBands . ""; } bandsstore ($_REQUEST['infoBands']);?>' size="1" /><input type="text" style="display:none" name="infoFacebook" value='<?php function facebookstore ($infoFacebook) { echo "" . $infoFacebook . ""; } facebookstore ($_REQUEST['infoFacebook']);?>' size="1" /><font size="2" color="#880000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>(Click on your tutorial link FIRST to proceed)</strong></font></div> </td> </tr> <tr height="38"> <td align="right" valign="top" width="242" height="38"> <div align="right"> <font size="2" color="#880000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>Choose another position:</strong></font></div> </td> <td colspan="2" align="left" valign="top" height="38"> <div align="center"> <input onclick="CSAction(new Array(/*CMP*/'81eee020'));return CSClickReturn()" onkeydown="CSAction(new Array(/*CMP*/'829c5723'));return true;" onkeyup="CSAction(new Array(/*CMP*/'826d4822'));" type="text" name="infoPosition2" readonly="readonly" size="21" tabindex="0" csclick="81eee020" cskdown="829c5723" cskyup="826d4822" /> <p><input type="submit" style="display:none" class="formbutton" name="submitAnotherPosition" value="Register" tabindex="1" /></p> </div> </td> </tr> </table> </form> <form id="formSkip" style="display:none" action="PhotoUpload.php" method="post" name="formSkip"> <table width="462" border="0" cellspacing="0" cellpadding="0"> <tr valign="top" height="67"> <td width="242" height="67"> <div align="right"> <input type="text" style="display:none" name="infoTwitter" value='<?php function twitterstore2 ($infoTwitter) { echo "" . $infoTwitter . ""; } twitterstore2 ($_REQUEST['infoTwitter']);?>' size="1" /><input type="text" style="display:none" name="infoGenre1" value='<?php function genres1store2 ($infoGenre1) { echo "" . $infoGenre1 . ""; } genres1store2 ($_REQUEST['infoGenre1']);?>' size="1" /><input type="text" style="display:none" name="infoEmailAddress" value='<?php function emailstore2 ($infoEmailAddress) { echo "" . $infoEmailAddress . ""; } emailstore2 ($_REQUEST['infoEmailAddress']);?>' size="1" /><input type="text" style="display:none" name="infoLocation" value='<?php function locationstore2 ($infoLocation) { echo "" . $infoLocation . ""; } locationstore2 ($_REQUEST['infoLocation']);?>' size="1" /><input type="text" style="display:none" name="infoPosition1" value='<?php function position1store2 ($infoPosition1) { echo "" . $infoPosition1 . ""; } position1store2 ($_REQUEST['infoPosition1']);?>' size="1" /><input type="text" style="display:none" name="infoUserName" value='<?php function namestore2 ($infoUserName) { echo "" . $infoUserName . ""; } namestore2 ($_REQUEST['infoUserName']);?>' readonly="readonly" size="1" /><input type="text" style="display:none" name="infoPassword" value='<?php function passwordstore2 ($infoPassword) { echo "" . $infoPassword . ""; } passwordstore2 ($_REQUEST['infoPassword']);?>' size="1" /><input type="text" style="display:none" name="infoGenre2" value='<?php function genres2store2 ($infoGenre2) { echo "" . $infoGenre2 . ""; } genres2store2 ($_REQUEST['infoGenre2']);?>' size="1" /><input type="text" style="display:none" name="infoMyspace" value='<?php function myspacestore2 ($infoMyspace) { echo "" . $infoMyspace . ""; } myspacestore2 ($_REQUEST['infoMyspace']);?>' size="1" /><input type="text" style="display:none" name="infoReady" value='<?php function readystore2 ($infoReady) { echo "" . $infoReady . ""; } readystore2 ($_REQUEST['infoReady']);?>' size="1" /><input type="text" style="display:none" name="infoGenre3" value='<?php function genres3store2 ($infoGenre3) { echo "" . $infoGenre3 . ""; } genres3store2 ($_REQUEST['infoGenre3']);?>' size="1" /><input type="text" style="display:none" name="infoCity" value='<?php function citystore2 ($infoCity) { echo "" . $infoCity . ""; } citystore2 ($_REQUEST['infoCity']);?>' size="1" /><input type="text" style="display:none" name="infoInstruments" value='<?php function instrumentstore2 ($infoInstruments) { echo "" . $infoInstruments . ""; } instrumentstore2 ($_REQUEST['infoInstruments']);?>' size="1" /><input type="text" style="display:none" name="infoBands" value='<?php function bandsstore2 ($infoBands) { echo "" . $infoBands . ""; } bandsstore2 ($_REQUEST['infoBands']);?>' size="1" /><input type="text" style="display:none" name="infoFacebook" value='<?php function facebookstore2 ($infoFacebook) { echo "" . $infoFacebook . ""; } facebookstore2 ($_REQUEST['infoFacebook']);?>' size="1" /></div> </td> <td colspan="2" height="67"> <div align="center"> <p><font size="2" color="#880000">or<br /> <br /> </font></p> <input type="submit" class="formbutton" name="submitButtonName" value="Skip more positions" tabindex="2" /></div> </td> </tr> </table> </form> </div> </td> </tr> <tr height="28"> <td colspan="2" valign="top" width="924" height="28"> <div align="center"> </div> </td> </tr> </table> <table width="900" border="0" cellspacing="0" cellpadding="0"> <tr height="100"> <td width="100" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/notepad_off.png" alt="" height="100" width="100" border="0" /></div> </td> <td width="60" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/redarrow.png" alt="" height="50" width="46" border="0" /></div> </td> <td width="100" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/checkmark_off.png" alt="" height="100" width="100" border="0" /></div> </td> <td width="60" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/redarrow.png" alt="" height="50" width="46" border="0" /></div> </td> <td width="100" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/tutorial_on.png" alt="" height="100" width="94" border="0" /></div> </td> <td width="60" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/redarrow.png" alt="" height="50" width="46" border="0" /></div> </td> <td width="100" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/handshake_off.png" alt="" height="60" width="100" border="0" /></div> </td> <td width="60" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/redarrow.png" alt="" height="50" width="46" border="0" /></div> </td> <td width="100" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/photo_off.png" alt="" height="100" width="100" border="0" /></div> </td> <td width="60" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/redarrow.png" alt="" height="50" width="46" border="0" /></div> </td> <td width="100" height="100"> <div align="center"> <img src="../../IMG/SIGNUPPAGE/guitar_off.png" alt="" height="100" width="100" border="0" /></div> </td> </tr> <tr> <td width="100"> <div align="center"> <font size="1" color="#353535" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif"><strong>Provide<br /> Profile<br /> Info</strong></font></div> </td> <td width="60"></td> <td width="100"> <div align="center"> <font size="1" color="#353535" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Complete<br /> Setup<br /> Checklist</font></div> </td> <td width="60"></td> <td width="100"> <div align="center"> <font size="1" color="#a00000" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Receive<br /> Personalized<br /> Tutorial</font></div> </td> <td width="60"></td> <td width="100"> <div align="center"> <font size="1" color="#353535" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Self Assign<br /> More<br /> Positions</font></div> </td> <td width="60"></td> <td width="100"> <div align="center"> <font size="1" color="#353535" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Upload<br /> Your Profile<br /> Photo</font></div> </td> <td width="60"></td> <td width="100"> <div align="center"> <font size="1" color="#353535" face="Trebuchet MS, Geneva, Arial, Helvetica, SunSans-Regular, sans-serif">Start<br /> Recording<br /> Tracks</font></div> </td> </tr> </table> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> <p></p> </div> </body> </form> </html>
  13. The problem I am experiencing is a bit of an odd one. I have written a function using visibility settings to reveal hidden boxes on my page after a button is pushed. The boxes of content begin hidden with a "visibility:none" setting and the function reveals them through a "visibility:inline" statement. Now, the code works perfectly fine when I'm previewing it in golive, but won't actually work properly when I try to actually use the page in a browser (ie: firefox, or explorer). Is there a conformed code I should be using to make sure this works everywhere? Here is my code for the function: function GotTutorial() { document.formRegister.submitAnotherPosition.style="display:inline"; document.formSkip.style="display:inline"; } Here is the code for my clickable button <img id="movie_off" onclick="GotTutorial()" src="../../IMG/SIGNUPPAGE/movie_off.png" alt="" name="movie_off" height="83" width="66" border="0" /> and here is the code for the items that are hidden, and will be revealed: <p><input type="submit" style="display:none" class="formbutton" name="submitAnotherPosition" value="Register" tabindex="1" /></p> </div> </td> </tr> </table> </form> <form id="formSkip" style="display:none" action="PhotoUpload.php" method="post" name="formSkip"> <table width="462" border="0" cellspacing="0" cellpadding="0"> <tr valign="top" height="67"> <td width="242" height="67"> </td> <td colspan="2" height="67"> <div align="center"> <p><font size="2" color="#880000">or<br /> <br /> </font></p> <input type="submit" class="formbutton" name="submitButtonName" value="Skip more positions" tabindex="2" /></div> </td> </tr> </table> </form>
  14. Nice, I checked it out and my files are saving with timestamps server side now. Works wonderfully. I'll be sure to remember your name. Now, on to design! Peace for now
  15. Nice Mikesta, you're a god send. I'd like to reitterate that I started off my post by saying I was pretty stupid when it comes to php . Heh, thanks for being patient with me. I'll mock it up and post a reply real soon with results. Thanks again Kaylub
  16. Right on, Thanks Mikesta That's what I had in mind. However, is there any way to combine both the timestamp and the file name into one string? (I know this is incorrect, but something along the lines of) $uniquename = $timestamp+$file_name; then later on $add="upload/$uniquename"; Is that possible? What's the proper syntax/format? Thanks again
  17. Thanks for the quick reply. I've got that much figured out ( $timestamp= time(); ) ...but I can't seem to apply the outputed timestamp to my file name/subsequent variable. Any Ideas?
  18. Hello, I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a form/php setup that allows a user to upload an image to my server. The upload is working well, and the code is functioning as is, however, I would like to add a timestamp to the file name before it is saved to the server, as well as making sure the time stamped file name is turned into a variable I can recall on a later php page. This is all in an effort to create unique filenames for uploaded content. Here is my current form code: <FORM ENCTYPE="multipart/form-data" ACTION="uploadck.php" METHOD=POST> Upload this file: <INPUT NAME="file_up" TYPE="file"> <INPUT TYPE="submit" VALUE="Send File"></FORM> and here is the php for that form: <? $file_upload="true"; $file_up_size=$_FILES['file_up']; echo $_FILES[file_up][name]; if ($_FILES[file_up]>1000000){$msg=$msg."Your uploaded file size is more than 1MB so please reduce the file size and then upload. Visit the help page to know how to reduce the file size.<BR>"; $file_upload="false";} if (!($_FILES[file_up][type] =="image/jpeg" OR $_FILES[file_up][type] =="image/gif")){$msg=$msg."Your uploaded file must be of JPG or GIF. Other file types are not allowed<BR>"; $file_upload="false";} $file_name=$_FILES[file_up][name]; $add="upload/$file_name"; // the path with the file name where the file will be stored, upload is the directory name. if($file_upload=="true"){ if(move_uploaded_file ($_FILES[file_up][tmp_name], $add)){ echo "Congratulations, file succesfully uploaded"; }else{echo "Failed to upload file Contact Site admin to fix the problem";} }else{echo $msg;} ?>
×
×
  • Create New...

Important Information

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.