Jump to content

Imtehbegginer

Members
  • Posts

    53
  • Joined

  • Last visited

    Never

Posts posted by Imtehbegginer

  1. I have a huge item file.

     

    <?php
    
    // MASTER ITEMS SCRIPT BY -ELEMENT
    // DO NOT CLAIM THIS AS YOUR OWN
    
    $items = array(
    '1' 	=> 'Flu Mask',
    '2' 	=> 'Black Mask',
    '3' 	=> 'Butterfly Mask',
    '4'	 	=> 'Zorro Mask',
    '5' 	=> 'Persian Mask',
    '6' 	=> 'Wicked Mask',
    '7' 	=> 'Jolly Front Mask',
    '8' 	=> 'Iron Mask',
    '9' 	=> 'Totem Mask',
    '10' 	=> 'Goblin Mask',
    '11'	=> 'Ashura Mask',
    '12'	=> 'Orc Mask',
    '13'	=> 'Mask of Lies',
    '14'	=> 'Mask of Truth',
    '15'	=> 'Mask of Venus',
    '16'	=> 'Demon Mask',
    '31'	=> 'Glasses Frame',
    '32'	=> 'Dork Glasses',
    '33'	=> 'Thick Framed Glasses',
    '34'	=> 'Sunglasses',
    '35'	=> 'Charming Sunglasses',
    '36'	=> 'Swimming Goggles',
    '37'	=> 'Engineer Goggles',
    '38'	=> 'Cart Goggles',
    '39'	=> 'Red Sunglasses',
    '40'	=> 'Blue Sunglasses',
    '41'	=> 'Yellow Sunglasses',
    '42'	=> 'Silver Sunglasses',
    '43'	=> 'Pilot Goggles',
    '44'	=> 'Near-Sighted Glasses',
    '45'	=> 'X-Ray Glasses',
    '46'	=> 'Neo Glasses',
    '62'	=> 'Pierrot Nose',
    '64'	=> 'Pinocchio Nose' ,
    '73'	=> 'Santa Beard',
    '121'	=> 'Ego Mask',
    '151'	=> 'Scream Mask',
    '152'	=> 'Nomadic Mask',
    '153'	=> 'Mummy Face',
    '156'	=> 'Jason Mask',
    '161'	=> 'Star Glasses',
    '162'	=> 'Matrix Eye',
    '166'	=> 'Cherry Blossom Glasses',
    '171'	=> 'Rat Tail Mustache',
    '172'	=> "Oro's Present",
    '181'	=> 'Junon Mask',
    '201'	=> 'False Scalp',
    '221'	=> 'Tulip Ribbon',
    '222'	=> 'Peacock Feather',
    '241'	=> 'Royal Crown',
    '301'	=> 'Elven Islamic Bandana',
    '302'	=> 'Dark Red Beret',
    '303'	=> 'Elven Red Beret',
    '304'	=> 'Dark Red Leather Beret',
    '305'	=> 'Golden Red Leather Beret',
    '306'	=> 'Elven Red Leather Beret',
    '307'	=> 'Dark Rodeo Hat',
    '308'	=> 'Golden Rodeo Hat',
    '309'	=> 'Elven Rodeo Hat',
    '310'	=> 'Dark Luxurious Rodeo Hat',
    '311'	=> 'Golden Luxurious Rodeo Hat',
    '312'	=> 'Elven Luxurious Rodeo Hat',
    '313'	=> 'Dark Joker Jester',
    '314'	=> 'Golden Joker Jester',
    '315'	=> 'Elven Joker Jester',
    '316'	=> 'Dark Luxurious Joker Jester',
    '317'	=> 'Golden Luxurious Joker Jester',
    '318'	=> 'Elven Luxurious Joker Jester',
    '319'	=> 'Dark Venetian Hat',
    '320'	=> 'Golden Venetian Hat',
    '321'	=> 'Elven Venetian Hat',
    '322'	=> 'Dark Luxurious Venetian Hat',
    '323'	=> 'Golden Luxurious Venetian Hat',
    '324'	=> 'Elven Luxurious Venetian Hat',
    '325'	=> 'Dark Junior Cap',
    '326'	=> 'Golden Junior Cap',
    '327'	=> 'Elven Junior Cap',
    '328'	=> 'Dark Senior Cap',
    '329'	=> 'Golden Senior Cap',
    '331'	=> 'Elven Senior Cap',
    '401'	=> 'Soldier Helm',
    '404'	=> 'Golden Soldier Helm',
    '405'	=> 'Saint Soldier Helm',
    '406'	=> 'Legend Soldier Helm',
    '409'	=> 'Iron Helm',
    '410'	=> 'Elven Iron Helm',
    '411'	=> 'Saint Iron Helm',
    '412'	=> 'Holy Iron Helm',
    '413'	=> 'Grand Iron Helm',
    '414'	=> 'Trunket Helm',
    '417'	=> 'Elven Trunket Helm',
    '418'	=> 'Saint Trunket Helm',
    '419'	=> 'Holy Trunket Helm',
    '420'	=> 'Grand Trunket Helm',
    '421'	=> 'Chrome Helm',
    '424'	=> 'Elven Chrome Helm',
    '425'	=> 'Saint Chrome Helm',
    '426'	=> 'Holy Chrome Helm',
    '427'	=> 'Grand Chrome Helm',
    '429'	=> 'Mighty Helm',
    '430'	=> 'Mighty Helm',
    '431'	=> 'Elven Mighty Helm',
    '432'	=> 'Saint Mighty Helm',
    '433'	=> 'Holy Mighty Helm',
    '434'	=> 'Grand Mighty Helm',
    '435'	=> 'Kurash Helm',
    '438'	=> 'Elven Kurash Helm',
    '439'	=> 'Saint Kurash Helm',
    '440'	=> 'Holy Kurash Helm',
    '441'	=> 'Grand Kurash Helm',
    '442'	=> 'Plate Helm',
    '443'	=> 'Plate Helm',
    '444'	=> 'Plate Helm',
    '445'	=> 'Golden Plate Helm',
    '446'	=> 'Elven Plate Helm',
    '447'	=> 'Saint Plate Helm',
    '448'	=> 'Legend Plate Helm',
    '501'	=> 'Spiritual Beret',
    '502'	=> 'Spiritual Beret',
    '503'	=> 'Spiritual Beret',
    '504'	=> 'Golden Spiritual Beret',
    '505'   => 'Saint Spiritual Beret',
    '506'	=> 	'Legend Spiritual Beret',
    '507'	=> 		'Green Hat of Witch',
    '508'	=> 	'Green Hat of Witch',
    '509'	=> 		'Green Hat of Witch',
    '510'	=> 	'Elven Green Hat of Witch',
    '511'	=> 	'Saint Green Hat of Witch',
    '512'	=> 	'Holy Green Hat of Witch',
    '513'	=> 	'Grand Green Hat of Witch',
    '514'	=> 	'Purple Hat of Witch',
    '515'	=> 	'Purple Hat of Witch',
    '516'	=> 	'Purple Hat of Witch',
    '517'	=> 	'Elven Purple Hat of Witch',
    '518'	=> 	'Saint Purple Hat of Witch',
    '519'	=> 	'Holly Purple Hat of Witch',
    '520'	=> 	'Grand Purple Hat of Witch',
    '521'	=> 	'Violet Beret',
    '522'	=> 	'Violet Beret',
    '523'	=> 	'Violet Beret',
    '524'	=> 	'Elven Violet Beret',
    '525'	=> 	'Saint Violet Beret',
    '526'	=> 	'Holy Violet Beret',
    '527'	=> 	'Grand Violet Beret',
    '528'	=> 	'Hat of Shadow',
    '529'	=> 	'Hat of Shadow',
    '530'	=> 	'Hat of Shadow',
    '531'	=> 	'Elven Hat of Shadow',
    '532'	=> 	'Saint Hat of Shadow',
    '533'	=> 	'Holy Hat of Shadow',
    '534'	=> 	'Grand Hat of Shadow',
    '535'	=> 'Velvet Hat of Witch',
    '536'	=> 	'Velvet Hat of Witch',
    '537'	=> 	'Velvet Hat of Witch',
    '538'	=> 	'Elven Velvet Hat of Witch',
    '539'	=> 	'Saint Velvet Hat of Witch',
    '540'	=> 	'Holy Velvet Hat of Witch',
    '541'	=> 	'Grand Velvet Hat of Witch',
    '601'	=> 	'Hunter Hat',
    '602'	=> 	'Hunter Hat',
    '603'	=> 	'Hunter Hat',
    '604'	=> 	'Golden Hunter Hat',
    '605'	=> 	'Saint Hunter Hat',
    '606'	=> 	'Legend Hunter Hat',
    '607'	=> 	'Criker Hat',
    '608'	=> 	'Criker Hat',
    '609'	=> 	'Criker Hat',
    '610'	=> 	'Elven Criker Hat',
    '611'	=> 	'Saint Criker Hat',
    '612'	=> 	'Holy Criker Hat',
    '613'	=> 	'Grand Criker Hat',
    '614'	=> 	'Ranger Hat',
    '615'	=> 	'Ranger Hat',
    '616'	=> 	'Ranger Hat',
    '617'	=> 	'Elven Ranger Hat',
    '618'	=> 	'Saint Ranger Hat',
    '619'	=> 	'Holy Ranger Hat',
    '620'	=> 	'Grand Ranger Hat',
    '621'	=> 	'Black Pirate Hat',
    '622'	=> 	'Black Pirate Hat',
    '623'	 => 	'Black Pirate Hat',
    '624'	=> 		'Elven Black Pirate Hat',
    '625'	=> 		'Saint Black Pirate Hat',
    '626'	=> 		'Holy Black Pirate Hat',
    '627'	=> 		'Grand Black Pirate Hat',
    '628'	=> 		"Mariner's Hat",
    '629'	=> 		"Mariner's Hat",
    '630'	=> 		"Mariner's Hat",
    '631'	=> 		"Elven Mariner's Hat",
    '632'	=>  	"Saint Mariner's Hat",
    '633'	=> 		"Holy Mariner's Hat",
    '634'	=> 		"Grand Mariner's Hat",
    '635'	=> 	'Jaguar Hat',
    '636'	=> 	'Jaguar Hat',
    '637'	=> 	'Jaguar Hat',
    '638'	=> 	'Elven Jaguar Hat',
    '639'	=> 	'Saint Jaguar Hat',
    '640'	=> 	'Holy Jaguar Hat',
    '641'	=> 	'Grand Jaguar Hat',
    '701'	=> 	'Brown Turban ',
    '702'	=> 	'Brown Turban ',
    '703'	=> 	'Brown Turban ',
    '704'	=> 	'Golden Brown Turban ',
    '705'	=> 	'Saint Brown Turban ',
    '706'	=> 	'Legend Brown Turban', 
    '707'	=> 	'Vibe Turban ',
    '708'	=> 	'Vibe Turban ',
    '709'	=> 	'Vibe Turban ',
    '710'	=> 	'Elven Vibe Turban ',
    '711'	=> 	'Saint Vibe Turban ',
    '712'	=> 	'Holy Vibe Turban ',
    '713'	=> 	'Grand Vibe Turban' 
    '714'	=> 	'Tamiya Goggles',
    '715'	=> 	'Tamiya Goggles',
    '716'	=> 	'Tamiya Goggles',
    '717'	=> 	'Elven Tamiya Goggles',
    '718'	=> 	'Saint Tamiya Goggles',
    '719'	=> 	'Holy Tamiya Goggles',
    '720'	=> 	'Grand Tamiya Goggles',
    '721'	=> 	'Semiya Goggles',
    '722'	=> 	'Semiya Goggles',
    '723'	=> 	'Semiya Goggles',
    '724'	=> 	'Elven Semiya Goggles',
    '725'	=> 	'Saint Semiya Goggles',
    '726'	=> 	'Holy Semiya Goggles',
    '727'	=> 	'Grand Semiya Goggles',
    '728'	=> 	'Merchant Hat ',
    '729'	=> 	'Merchant Hat ',
    '730'	=> 	'Merchant Hat ',
    '731'	=> 	'Elven Merchant Hat ',
    '732'	=> 	'Saint Merchant Hat', 
    '733'	=> 	'Holy Merchant Hat',
    '734'	=> 	'Grand Merchant Hat',
    '735'	=> 	'Rich Merchant Turban',
    '736'	=> 	'Rich Merchant Turban',
    '737'	=> 	'Rich Merchant Turban',
    '738'	=> 	'Elven Rich Merchant Turban',
    '739'	=> 	'Saint Rich Merchant Turban',
    '740'	=> 	'Holy Rich Merchant Turban',
    '741'	=> 	'Grand Rich Merchant Turban',
    '744'	=> 	'Mercenary Helm',
    '745'	=> 	'Warlord Helm',
    '746'	=> 	'Tyrant Helm',
    '747'	=> 	'Sparkly Purple Hat of Witch',
    '748'	=> 	'Shiny Violet Beret',
    '749'	=> 	'Hat of Wisdom',
    '750'	=> 	'Nimble Hat',
    '751'	=> 	'Sagittarius Hat',
    '752'	=> 	'Commodore Hat',
    '753'	=> 	'Repairman Goggles',
    '754'	=> 	'Craftman Goggles',
    '755'	=> 	"Supplier's Turban",
    '801'	=> 	'Panda Hat',
    '802'	=> 	'Bug Hat',
    '803'	=> 	'Lion Hat',
    '804'	=> 	'Cat Hat',
    '811'	=> 	'Junon Native Headdress',
    '812'	=> 	'Red Chicken Hat',
    '813'	=> 	'Lizard Hat',
    '814'	=> 	'Rabbit Hairband',
    '815'	=> 	'Devil Horn',
    '820'	=> 	'Green Lion Hat',
    '821'	=> 	"Adventurer's Beret",
    '823'	=> 	'Blue Santa Cap',
    '824'	=> 	'Navy Blue Magic School Hat',
    '825'	=> 	'Angel Hat',
    '826'	=> 	'Kerokero Hat',
    '827'	=> 	'Headband',
    '828'	=> 	'New Abyss Plate Helmet',
    '829'	=> 	'New Serenity Bonnet',
    '830'	=> 	'New Captain Hat',
    '831'	=> 	'New Bourgeois Head',
    '832'	=> 	'White Magic School Hat',
    ?>

     

    Also a file items_add.php, that on each line it has a new item id. it is included. How can I make it so that in the items_add.php file, it will echo the name FROM the itemid in the array.

  2. if (($_POST['str'] + $_POST['int'] + $_POST['con'] + $_POST['dex']) > $row['statp']) {
      die('Not enough points!');
    }
    $stats_new = $_POST['str'] + $_POST['con'] + $_POST['dex'] + $_POST['int'] = $
    $result = mysql_query("UPDATE characters SET str = '".$_POST['str']."' WHERE char_name = '".$_GET['char']."'");
    $result = mysql_query("UPDATE characters SET dex = '".$_POST['dex']."' WHERE char_name = '".$_GET['char']."'");
    $result = mysql_query("UPDATE characters SET con = '".$_POST['con']."' WHERE char_name = '".$_GET['char']."'");
    $result = mysql_query("UPDATE characters SET _int = '".$_POST['int']."' WHERE char_name = '".$_GET['char']."'");
    [b]$result = mysql_query("UPDATE characters SET statp = '".$_POST['statp']."' WHERE char_name = '".$_GET['char']."'");[/b]

     

    I wish to know, how I take away the amount of $_POST['str'] + $_POST['con'] + $_POST['dex'] + $_POST['int'] from the statp row.

  3. <?php
      $re = mysql_query("SELECT * FROM characters");
      $row = mysql_fetch_array($re);
      $str = $row['str'];
      $con = $row['con'];
      $int = $row['_int'];
      $dex = $row['dex'];
      $lvl = $row['level'];
      ?>

     

    All of them are echod into a space for the user to see there current character points.

    There is a row: statp, that's how many points they have.

     

    How can I make sure that the input of str, con, dex, and int dont go over the amount in the statp row?

  4. <?php
      echo "
    <select name='myjumpbox'>
         <option selected>Select a character....
         <option value=''>".$datas['username']."
     <option value=''>".$datas['username']."
    </select>";
    ?>

     

    How can I make the 2nd row of username to come up instead of only the first?

  5. I am developing a script for a game, and I was wondering, how I can get the "Character Names" printed into a select menu, one by one, doesnt matter what values. But here is my code.

     

    <?php 
    $ptr = mysql_query("SELECT * FROM characters WHERE account_name = '".$_POST['user']."'");
    $chardata = mysql_fetch_array($ptr);
    $str = $chardata['str'];
    $dex = $chardata['dex'];
    $con = $chardata['con'];
    $int = $chardata['_int'];
    ?>

     

    The account name is in a row with char_name, how can I print it into a <select><option></select></option> menu?

     

    AND when you select it, make it go to a certain page?

  6. Wierd...

     

    My code:

    $str = mysql_query("SELECT str FROM characters WHERE char_name = '".$_POST['char_name']."'");
    $dex = mysql_query("SELECT dex FROM characters WHERE char_name = '".$_POST['char_name']."'");
    $con = mysql_query("SELECT con FROM characters WHERE char_name = '".$_POST['char_name']."'");
    $int = mysql_query("SELECT _int FROM characters WHERE char_name = '".$_POST['char_name']."'");
    $lvl = mysql_query("SELECT level FROM characters WHERE char_name = '".$_POST['char_name']."'");
    

     

    The str in the characters table = 15, but when I do: <?php echo $str ; ?> I get "Resource #7" any ideas?

  7. My code:
    [code]<?php
    // LOGIN
    include 'includes/connect.php';
    $query_select_login = mysql_query("SELECT username FROM accounts WHERE username = '".$_POST['username']."'");
    $query_rows = mysql_num_rows($query_select_login);
    // Check for the username above.
    // Now we check the rows
    if($query_rows = 0) {
    die("There is no such username in the database.");
    } else {
    echo "";
    }
    $query_select_pass = mysql_query("SELECT password FROM accounts WHERE password = '".$_POST['password']."'");
    // THIS IS WHERE PHPFREAKS HELPS ME.[/code]

    How can I make the password select from the row of that username?
  8. [code]<?php
        include 'config.php';
      $result = mysql_query("SELECT char_name FROM characters LIMIT 5")
    or die(mysql_error()); 
    $echos = $row['char_name'];
    echo $echos;
    ?>[/code]

    That's my code, my config.php file connects to mysql. It doesnt show anything, just shows a blank page.
  9. Here is my code
    [code]<HTML>
    <HEAD>
    <TITLE><?php include 'config.php';
    echo $config['servname'];?></TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <LINK REL="stylesheet" HREF="styles/style.css" TYPE="text/css">
    <style type="text/css">
    <!--
    .style1 {color: #999999}
    -->
    </style>
    </HEAD>

    <BODY BGCOLOR="323232" TEXT="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
    <TABLE WIDTH="10%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER"><TR><TD><IMG SRC="images/interface_01.gif" WIDTH="800" HEIGHT="110"></TD></TR><TR><TD><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD BGCOLOR="494E52" WIDTH="4%" BACKGROUND="images/interface_11.gif" VALIGN="TOP"><TABLE WIDTH="0%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD><IMG SRC="images/interface_02.gif" WIDTH="163" HEIGHT="20"></TD></TR><TR><TD BACKGROUND="images/interface_05.gif"><TABLE WIDTH="81%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="RIGHT"><TR>
      <TD CLASS="text1"><A HREF="index.php">Home</A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="<?php include 'config.php';
      echo $config['forum'];?>">Forums</A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="rankings.php">Rankings</A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="download.php" target="_self">Downloads</A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="stats.php">Statistics</A></TD>
    </TR></TABLE></TD></TR><TR><TD><IMG SRC="images/interface_06.gif" WIDTH="163" HEIGHT="22"></TD></TR><TR><TD BACKGROUND="images/interface_07.gif">&nbsp;</TD></TR><TR><TD><IMG SRC="images/interface_08.gif" WIDTH="163" HEIGHT="28"></TD></TR><TR><TD BACKGROUND="images/interface_09.gif"><TABLE WIDTH="81%" BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="RIGHT"><TR>
      <TD CLASS="text1"><A HREF="usercp.php">Members Area </A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="admincp.php">Admin Area </A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="register.php">Register</A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="cpass.php">Change Password </A></TD>
    </TR><TR>
      <TD CLASS="text1"><A HREF="rpass.php">Recover Password </A></TD>
    </TR></TABLE></TD></TR><TR><TD BACKGROUND="images/interface_09.gif"><IMG SRC="images/interface_10.gif" WIDTH="163" HEIGHT="20"></TD></TR><TR><TD BACKGROUND="images/interface_11.gif">&nbsp;</TD></TR></TABLE></TD><TD WIDTH="89%" BGCOLOR="494E52" VALIGN="TOP"><DIV ALIGN="CENTER"><SPAN CLASS="pagehead">
    <BR> HOME</SPAN><BR><BR></DIV><TABLE CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="#000000" WIDTH="266" HEIGHT="25" ALIGN="CENTER">
    <TR> <TD WIDTH="264"><TABLE CELLPADDING="1" CELLSPACING="0" BORDER="0" BGCOLOR="7E9AB8" WIDTH="159" HEIGHT="25">
    <TR> <TD WIDTH="157" BGCOLOR="737C83"> <TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0" BGCOLOR="#ffffff" WIDTH="391">
    <TR> <TD HEIGHT="45" BGCOLOR="5C6368"><DIV ALIGN="CENTER"><BR><TABLE WIDTH="94%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR>
      <TD CLASS="news"><p>Server Rankings </p>    </TD>
    </TR><TR>
      <TD CLASS="pagehead">
        <table width="302" height="115" border="0" align="center" class="text1">
          <tr>
            <td width="80"><span class="style1">Name</span></td>
            <td width="64"><span class="style1">Level</span></td>
            <td width="51"><span class="style1">Zuly</span></td>
            <td width="79"><span class="style1">Class</span></td>
          </tr>
          <tr>
            <td height="29"><?php
    include 'config.php';
    $result = mysql_query("SELECT level, char_name, zuly, classid FROM characters ORDER BY level DESC")
    or die(mysql_error()); 

    // keeps getting the next row until there are no more to get
    while($row = mysql_fetch_array( $result )) {
    // Print out the contents of each row into a table
    echo $row['char_name'];
    include ('modules/class.php');
    echo "</td></tr>";
    }
    ?>&nbsp;</td>
            <td>&nbsp;</td>
            <td><?php

    include 'config.php';
    $result = mysql_query("SELECT level, char_name, zuly, classid FROM characters ORDER BY level DESC")
    or die(mysql_error()); 

    // keeps getting the next row until there are no more to get
    while($row = mysql_fetch_array( $result )) {
    // Print out the contents of each row into a table
    echo $row['level'];
    include ('modules/class.php');
    echo "</td></tr>";
    }
    ?></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table>
        <br></TD>
    </TR></TABLE>
          <BR>
    <BR></DIV></TD></TR> </TABLE></TD></TR> </TABLE></TD></TR>
    </TABLE><BR><BR>
    <BR>
    <BR><BR><BR><BR><BR><BR><BR></TD><TD WIDTH="7%" BACKGROUND="images/interface_04.gif" VALIGN="TOP"><IMG SRC="images/interface_04.gif" WIDTH="52" HEIGHT="10"></TD></TR></TABLE></TD></TR><TR><TD><img src="images/interface_12.gif" width="800" height="71" border="0" usemap="#Map">
        <map name="Map">
          <area shape="rect" coords="652,54,769,84" href="http://www.clantemplates.com" target="_blank">
        </map>
        </TD>
    </TR></TABLE>
    </BODY>
    </HTML>
    [/code]

    But Im only getting the FIRST row.. how can I get the 2nd, third, fourth and so on?
  10. [code]<?php
    $filename = 'config.php';
    $somecontent = "<?PHP
    $databasehost = $databasehost
    ?>";

    // Let's make sure the file exists and is writable first.
    if (is_writable($filename)) {

      // In our example we're opening $filename in append mode.
      // The file pointer is at the bottom of the file hence
      // that's where $somecontent will go when we fwrite() it.
      if (!$handle = fopen($filename, 'a')) {
            echo "Cannot open file ($filename)";
            exit;
      }

      // Write $somecontent to our opened file.
      if (fwrite($handle, $somecontent) === FALSE) {
          echo "Cannot write to file ($filename)";
          exit;
      }
     
      echo "Success, wrote ($somecontent) to file ($filename)";
     
      fclose($handle);

    } else {
      echo "The file $filename is not writable";
    }
    ?> [/code]
    Install.php posts to this, that's where I get the $databasehost variable from.
    Now, when I try to write the $somecontent It writes the whole script. Dont I have to use $_POST['var'], if I use that, I get a different error. A while back, wildteen88 posted one for me.
  11. Everyone knows about the [b]f[/b] functions.
    fopen
    fwrite
    fclose

    Can anyone put together a small script, that will write to a file called config.php. Ill config everything else myself. Just a script that will open the file, write to it, and then close it. Please include a few text boxes.
×
×
  • 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.