Jump to content

Q695

Members
  • Posts

    783
  • Joined

  • Last visited

Everything posted by Q695

  1. Q695

    Overlapping Images

    Fail <img width="20" height="20" alt="terain" src="images/water.jpg" style="z-index:0;"> <img width="20" height="20" style="z-index:1;" src="images/here.gif">
  2. Q695

    Overlapping Images

    I'm old school, and one image is being placed below the other one, not layered in the <td>.
  3. <td> <?php mapgen(0, 0); // base image not in div tag ?> <div STYLE="{z-index:1;}"> <img src="images/here.gif" height="20" width="20" style="z-index:1;"> </div> </td> What's wrong that would put 1 image below the other in a table format?
  4. Thanks MN North Stars
  5. my print_r from a database is: Array ( [0] => 1 [1] => 1 [2] => 11 [3] => 1 ) the script is a standard php/mysql pull that I've used labeled rows with before: $sqli1 = "SELECT * FROM ..................................."; $result1 = mysql_query($sqli1, $con) or die ("can not generate result " . mysql_error()); $row1 = mysql_fetch_row($result1); What's going wrong to not load column names?
  6. Took a while but solved it somehow by setting a negative case value outside of the data bounds: <?php if (isset($_GET["action"])){ $action = $_GET["action"]; echo "act" . $action; } else { $action=-10; } switch ($action) { case "see": include 'see.php'; break; case "kill": include 'kill.php'; break; default: include 'explore_main.php'; break; } ?>
  7. the var string is "?page=1", and it goes to see.php
  8. <?php /* this defaulting to see.php */ if (isset($_GET["action"])){ $action = $_GET["action"]; echo "act" . $action; } else { $action=0; } switch ($action) { case "see": include 'see.php'; break; case "kill": include 'kill.php'; break; default: include 'explore_main.php'; } ?>
  9. I tried removing the 2 text cases it worked fine, but when I rewrite them I get the error in the switch statement
  10. I tried setting it at the beginning of the applet, and it didn't work. Here is the error statement
  11. Why are the words causing the switch to die switch ($page) { case "1": include 'explore.php'; break; case "see": include 'see.php'; break; case "kill": include 'kill.php'; break; case "2": include 'inventory.php'; break; case "3": include 'guilds.php'; break; default: echo "entry"; }
  12. X, and Y are geometry figures the == solved it for the most part, just need to figure out the last bug on my own
  13. For some reason X, and Y are being rewritten (only option 1 is showing up but the other stuff is visible) when they're intrtnal to the function (subtracting 1). <?php function mapgen($x, $y){ global $con, $cx, $cy, $cz, $m_q, $m_w, $m_e, $m_a, $m_s, $m_d, $m_z, $m_x, $m_c; $mx=$cx+$x; $my=$cy+$y; echo $x.",". $y; $sql_m= "select * from map WHERE x=$mx AND y=$my AND z=$cz"; $result = mysql_query($sql_m, $con) or die ("can not generate result " . mysql_error()); $row_m = mysql_fetch_assoc($result); //print_r($row_m); //echo $mx . "," . $my; if ($row_m) { echo "<img src='images/" . $row_m['img'] . "' alt='terain' height='20' width='20' />"; if ($x='-1' && $y='1') {$m_q=1;} else if($x='0' && $y='1') {$m_w=1;} else if($x='1' && $y='1') {$m_e=1;} else if($x='-1' && $y='0') {$m_a=1;} else if($x='0' && $y='0') {$m_s=1;} else if($x='1' && $y='0') {$m_d=1;} else if($x='-1' && $y='-1') {$m_z=1;} else if($x='0' && $y='-1') {$m_x=1;} else if($x='1' && $y='-1') {$m_c=1;} else { echo"error"; } } else { echo "<img src='images/clear.gif' height='20' width='20' alt='null'>"; } } ?>
  14. It is a commonly performed procedure, and I was surprised that it didn't get posted on the PHP applets forum.
  15. Does anyone have an image up-loader script that is easy to manipulate for the address, and renaming based upon the number in the file system the image is, or do I need to work on figuring it out on my own?
  16. Does anyone have a good PHP security checklist to use when developing a website (i.e. reduce hacker logins, sql injections, et al)?
  17. I guess I should've been using a where, not while .
  18. I know, but what what is the code solution to build an array out of filter picked solutions? I can put 0, due to the auto-increment never having that be a number, but if the website takes off, I want something that will be quicker than checking if something is always going to be a 0. It could put your own posts up.
  19. It wouldn't pull data if there wasn't any data in the database, is there anything in the database? It is much easier to do "select *" so that you can pull data as you need it.
  20. new error: Array ( [0] => [1] => 1 ) Array ( [0] => [1] => 1 [2] => 4 ) sql error sql : SELECT * FROM thoughts WHERE id IN (, 1, 4) ORDER BY `thoughts`.`time` DESC 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 ' 1, 4) ORDER BY `thoughts`.`time` DESC' at line 1 My array loader code is: $contacts = array(""); while ($row=mysql_fetch_array($result)){ if ($id==$row[user_1]){ $contact=$row[user_2]; } else { $contact=$row[user_1]; } array_push($contacts, "$contact"); print_r($contacts); }
  21. What am I missing to do the search? error test: Array ( [0] => [1] => 1 ) Array ( [0] => [1] => 1 [2] => 4 ) sql error sql : SELECT * FROM thoughts WHILE id = 'Array' ORDER BY `thoughts`.`time` DESC 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 'WHILE id = 'Array' ORDER BY `thoughts`.`time` DESC' at line 1 <?php $sql2="SELECT * FROM thoughts WHILE id = '$contacts' ORDER BY `thoughts`.`time` DESC"; $result=@mysql_query($sql2,$con) or die(death($sql2)); ?>
  22. Lunar pages is very to use, and their sites load quickly. Their winter special is $4.95, and the specs are: General account information: Hosting package default Shared Ip Address 67.210.123.60 Subdomains 0 / 999 Parked Domains 2 / 999 Addon Domains 0 / unlimited MySQL Databases 3 / 999 Postgresql Databases 0 / 999 Disk Space Usage 5.05 Megabytes MySQL Disk Space 0.22 Megabytes Disk space available Unlimited Megabytes Bandwidth (this month) 22.43 Megabytes Email Accounts 0 / 999 Email Forwarders 0 Auto-responders 0 Mailing Lists 0 / 1 Email Filters 0 Ftp Accounts 0 / 999 General server information: Operating system Linux Service Status Click to View Kernel version 2.6.9-78.0.8.ELsmp Machine Type i686 Apache version 2.0.63 PERL version 5.8.8 Path to PERL /usr/bin/perl Path to sendmail /usr/sbin/sendmail Installed Perl Modules Click to View PHP version 4.4.9 MySQL version 5.0.67-community cPanel Version 11.24.4-RELEASE 32603 Theme cPanel X v2.5.0 Documentation Click to View
×
×
  • 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.