Jump to content

djfox

Members
  • Posts

    327
  • Joined

  • Last visited

    Never

Everything posted by djfox

  1. I`ve read pages on cron jobs and wanted to ask some questions before I get one started and end up having mistakes. 1. Am I correct in assuming that you use cron jobs to execute a php file that would do a certain thing that you want done at a time interval? 2. The "command to run" field when setting up a cron job, is that where you would enter a php file that you want ran? 3. If yes to 1, do I need to do anything special with the php file because cron job would be using it or is just the normal php coding I use would be fine? 4. Can I have setup more than one cron job?
  2. IE has issues with png files. The same happens on my site (secrettrance.net) and on Gaia Online when using IE.
  3. My cPanel for my server has an ip blocker. I couldn`t tell you much more information than that. I haven`t had to use it yet (knock on wood).
  4. I hope I`m in the right forum. I`m wondering that if you block an IP address from accessing your site, which error message do they get? (Like 404, 501, etc) I ask because I want to make a custom message but have no idea which one I need to edit.
  5. Ok, I got gender set to varchar (hoping that it would leave the input alone and not capitalize anything). Now the form sends "Both" instead of "b". (First post shows that the value to be sent should be just "b".) Strange I`ve never had such a problem with forms before. =P
  6. Now I`m worried. I set the new field gend to type varchar and the table immediately changed it to char and won`t let me change that type either. My mistake, I did not realize that varchar needs a larger number than 2 for it`s lengths.
  7. It keeps changing it back to char. It updates the lengths but it won`t update the type.
  8. Odd, it inputted "fe" instead of "b".
  9. I have this section of a form made: <b>Gender:</b> <br><select name="gender" style="border: 0px; background-color:#000000; color: #B6ABCE;"> <option value="b">Both <option value="f">Female <option value="m">Male </select> Here`s the php section that the results of all of the fields in the form are sent to: $add="INSERT INTO clothing ( name, desc2, shortname, store, files, layers, gender, posespec, type, cost, spec, date ) VALUES ( '$title', '$des', '$short', '$region', '$filenames', '$lay', '$gender', '$pose', '$type', '$price','$spe', '$entry_date' )"; $res = mysql_query($add) or die(mysql_error()); When the field entry for gender is supposed to be is "b". But when the form is filled out and sent, the gender entry "b" is somehow changed to "B", which causes complications for several other pages. The "gender" field in the database table was set to char type and thinking that was why, I tried changing it to varchar. But the mysql doesn`t want to change it to varchar. What should I do to keep the letter lowercase?
  10. Oh I didn`t know that. Thanks very much. That did solve the problem.
  11. I get the following error message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, shortname, store, files, layers, gender, posespec, type, cost, spec, date ' at line 1 Here`s admin_clothing_add.php: <?php //Date: December 31 2007 //For: www.secrettrance.net //Description: Admin Panel: Add Clothing include("dbcon.php"); require_once "design.php"; require_once "auth.php"; $Title = "Secret Trance: Admin Panel: Add Clothing"; require_once "header.php"; require_once "hidestatus.php"; if (!isLoggedIn()) { Redirect("index.php"); } ?> <p> <table border=0 width=100% bgcolor="000000"><? //2 ?> <tr> <td background="<? echo "$boxbanner"; ?>"><b>Admin Panel: Add Clothing</b> <tr> <td background="<? echo "$boxback"; ?>"> <?php if ($lev > 7) { ?> <form action="admin_clothing_add2.php"> <b>Name:</b> <br><input type="text" name="title" size="60" maxlength="255"> <p> <b>Description:</b> <br><input type="text" name="des" size="60" maxlength="255"> <p> <b>Short Name:</b> <br><input type="text" name="short" size="60" maxlength="255"> <p> <b>Region:</b> <br><select name="region" style="border: 0px; background-color:#000000; color: #B6ABCE;"> <?php $res = mysql_query("SELECT id, name FROM shops ORDER BY name ASC"); while ( $cats = mysql_fetch_row($res) ){ echo "<option value='$cats[0]'>$cats[1]</option>"; } ?> </select> <p> <b>Files:</b> <font size=2>(Exclude .png extensions. Seperate by ,)</font> <br><input type="text" name="filenames" size="60"> <p> <b>Layers:</b> <font size=2>(Coordinate layer numbers with file names listed above.)</font> <br><input type="text" name="lay" size="60"> <p> <b>Gender:</b> <br><select name="gender" style="border: 0px; background-color:#000000; color: #B6ABCE;"> <option value="b">Both <option value="f">Female <option value="m">Male </select> <p> <b>Is Item Pose Specific?</b> <br><input type="radio" name="pose" value="0"> No <br><input type="radio" name="pose" value="1"> Yes <p> <b>Item Type</b> <br><select name="type" style="border: 0px; background-color:#000000; color: #B6ABCE;"> <?php $res = mysql_query("SELECT id, name FROM categories ORDER BY name ASC"); while ( $cats2 = mysql_fetch_row($res) ){ echo "<option value='$cats2[1]'>$cats2[1]</option>"; } ?> </select> <p> <b>Cost:</b> <br><input type="text" name="price" size="60" maxlength="100"> <p> <b>Is Item Special Item?</b> <br><input type="radio" name="spe" value="0"> No <br><input type="radio" name="spe" value="1"> Yes <p> <input type="image" src="<? echo $butadd ?>" name="submit"> </form> <?php } else{ if ($lev < { header("Location: today.php"); } } ?> </table><? //2 ?> <p> <? require_once "footer.php"; ?> admin_clothing_add2.php: <?php session_start(); //Date: December 31 2007 //For: www.secrettrance.net //Description: Admin Panel: Add Clothing include("dbcon.php"); require_once "design.php"; require_once "auth.php"; $Title = "Secret Trance: Admin Panel: Add Clothing"; require_once "header.php"; require_once "hidestatus.php"; if (!isLoggedIn()) { Redirect("index.php"); } if ($lev > { $entry_date = strftime("%B\ %e\,\ %Y %H:%M:%S", time()); $add="INSERT INTO clothing ( name, desc, shortname, store, files, layers, gender, posespec, type, cost, spec, date ) VALUES ( '$title', '$des', '$short', '$region', '$filenames', '$lay', '$gender', '$pose', '$type', '$price','$spe', '$entry_date' )"; $res = mysql_query($add) or die(mysql_error()); mysql_close($con); //Redirect header("Location: admin_clothing_add.php"); } else{ if ($lev < 9) { header("Location: today.php"); } } ?> Here`s a screenshot of 'clothing' table:
  12. Changed echo "<img src'".$dollfile."'>"; to echo "<img src='".$dollfile."'>"; And it worked! Thanks for the help!
  13. <?php $dollfile = 'dolls/images/doll_user$user[1].png' ; if (file_exists($dollfile)) { echo "<img src'$dollfile'>"; } else { echo "You haven`t created a doll yet!"; } ?> It`s telling me he file doesn`t exist but I know it does. If I were to put in plainly: <img src="dolls/images/doll_user$user[1].png"> the file loads. Did I do something wrong in my code?
  14. If the file dolls/images/doll_user$user[1].png ($user[1] grabbed from a database table) exists, I need the file to show, but if it doesn`t exist, it needs to show a message. I have the following code: <?php if (dolls/images/doll_user$user[1].png) { echo "<img src'dolls/images/doll_user$user[1].png'>"; } else { echo "You haven`t created a doll yet!"; } ?> But this message appears: Parse error: syntax error, unexpected T_VARIABLE in /home/secrett1/public_html/trancer_header2.php on line 157 Line 157 is: if (dolls/images/doll_user$user[1].png) { I guess for an actual file, the code needs to be different?
  15. I have the following sting: <br>Msn: <b><? echo $user[8]; ?></b> If $user[8] is empty, I want that entire string to just not show up. But if $user[8] does have something, I want that string to be visible. How do I make that happen?
  16. Well, if this is your entire code, I do not see a <table> tag anywhere. You should have something like this: <table border=1 width=100%> <tr> <td width="20%" height="30" align="center" valign="middle" style="background-color:#333355; color:#FFFFFF" onMouseOver="this.style.backgroundColor='#333366';MM_showHideLayers('human_resources','','hide','operations','','hide','airline_information','','hide','communications','','hide')" onMouseOut="this.style.backgroundColor='#333355'" >Home</td> <td width="20%" height="30" align="center" valign="middle" bgcolor="#FFFFFF" style="background-color:#333355; color:#FFFFFF" onMouseOver="this.style.backgroundColor='#333366';MM_showHideLayers('human_resources','','show','operations','','hide','airline_information','','hide','communications','','hide')" onMouseOut="this.style.backgroundColor='#333355'">Human Resources</td> <td width="20%" height="30" align="center" valign="middle" bgcolor="#FFFFFF" style="background-color:#333355; color:#FFFFFF" onMouseOver="this.style.backgroundColor='#333366'" onMouseOut="this.style.backgroundColor='#333355'"><span class="style1">Operations</span></td> <td width="20%" height="30" align="center" valign="middle" bgcolor="#FFFFFF" style="background-color:#333355; color:#FFFFFF" onMouseOver="this.style.backgroundColor='#333366'" onMouseOut="this.style.backgroundColor='#333355'"><span class="style1">Airline Information</span></td> <td width="20%" height="30" align="center" valign="middle" bgcolor="#FFFFFF" style="background-color:#333355; color:#FFFFFF" onMouseOver="this.style.backgroundColor='#333366'" onMouseOut="this.style.backgroundColor='#333355'"><span class="style1">Communications</span></td> </tr> <tr> <td height="25%" colspan="5" align="center" valign="top" bgcolor="#FFFFFF"><div class="style2" id="human_resources" onmouseout="MM_showHideLayers('human_resources','','hide')">Job Application | Available Positions | Legal Information</div> <div class="style2" id="operations">Login | Hanger | Flight Map | Hubs</div> <div class="style2" id="airline_information">Staff | Mission | Statistics | Zoom Airlines</div> <div class="style2" id="communications">Teamspeak | Forum | Contact</div><hr /></td> </tr> </table> border is how thick you want it to be, and width is how much of the screen it will take up in length. Those values can be changed to whatever you want.
  17. When you say invisible, do you mean make the border of the table invisible?
  18. You might want to to put code around your codes there to make it easier for us to look at your code. (It`s the little button with the # symbol on it when you make posts.)
  19. Oh my goodness, how stupid of me. Thanks very much for the help.
  20. I have a code to display items via listing their price by lowest to highest (ORDER BY sellprice ASC). Technically this works. Say we have 5 items: Item 1: 50 Item 2: 10 Item 3: 45 Item 4: 100 Item 5: 60 It displays the items like this: Item 2: 10 Item 4: 100 Item 3: 45 Item 1: 50 Item 5: 60 This is the display I want: Item 2: 10 Item 3: 45 Item 1: 50 Item 5: 60 Item 4: 100 I`ve seen other websites that can do this but I can`t figure out how to do this.
  21. Well, the reason I want to do that is because I`m entering a search in which people can type in the name of the species they may want to look for. But if spec is a number, they can`t find the entires of, say, "cat".
  22. Ok, I have the code from before to apply to all entries in the database: mysql_query("update ownedpets set food = (food - " .$_REQUEST["food"].")"); mysql_query("update ownedpets set play = (play - " .$_REQUEST["play"].")"); But let`s say in the database table, I enter the new field "species". Well all the entries would have a blank and would have nothing for that. I`d like to some way use a form to update all the entries with the proper information for the field "species". But each one will have a different species name. In this example, the table "ownedpets" already has a field of "spec" which has a number. I have another table "p_species" with the fields "id, name". The "id" would be the same number as "spec" from "ownedpets". So, when the submission for this form is made, I need applied to all entries that if ownedpets spec=1, then species needs to update with "name" from "p_species" where id=1, and that all entries if ownedpets spec=5, then species would update with "name" from "p_species" where id=5, etc etc etc. How would I get that accomplished?
×
×
  • 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.