Current location: Hot Scripts Forums » Programming Languages » PHP » Need help with some php mysql


Need help with some php mysql

Reply
  #1 (permalink)  
Old 01-31-06, 01:55 PM
TheTinkeringToad TheTinkeringToad is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Need help with some php mysql

Hello.
To start off with i know very little about php and mysql some but not enough to know enough to resolve problems of any kind.
Ok at the house here we have some individuals playing Lineage 2.
We wanted to set up our own fansite for the game as some of the data out on the web is a bit out dated with all the updates going on. That being said we have located one of the original database suppliers for the web for this game his name is duncan. He is sharing his data to anyone who wants to use it. Most of the web sites out on the web are useing his platform in one form or another. Though they have there own professional coders that are modifying the db or php pages to suit there own needs. That is all fine and good. I can understand why they will not share there codeing.
My problem is it seems that his php pages that he has supplied are for a different database other then mysql.
So how do i convert his php pages to use mysql instead of pg.

If i can get one page working i can get the others to do so. Also so can someone give me a hand in changing the php pages to use mysql there are two pages invloved one is the template page to connect to the db
the other is a page to view the data you want.

Below are the two pages first will be the page to connect to the db the will follow the other page

Page 1
<?php

function l2dp_header()
{
global $l2dp_lang;

if ( isset( $_GET['language'] ) )
{
setcookie( 'language', '', time()-3600, '/' );
setcookie( 'language', $_GET['language'], time()+3600*24*30, '/' );
$l2dp_lang = $_GET['language'];
}
else
{
if ( ( isset( $_COOKIE['language'] ) )
&& ( strlen( $_COOKIE['language'] ) == 2 ) )
{
$l2dp_lang = $_COOKIE['language'];
}
else
{
setcookie( 'language', '', time()-3600, '/' );
setcookie( 'language', 'en', time()+3600*24*30, '/' );
$l2dp_lang = 'en';
}
}

echo <<<EOD
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
<LINK href="l2dp.css" rel="stylesheet" type="text/css"/>

EOD;
}

function l2dp_body()
{
echo "</head>\n";
echo "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\"";
echo " vlink=\"#FF00FF\" alink=\"#FF0000\">\n";

if ( strstr( $_SERVER['REQUEST_URI'], '?' ) )
{
$base = $_SERVER['REQUEST_URI'] . '&';
}
else
{
$base = $_SERVER['REQUEST_URI'] . '?';
}
echo "<table border=0 width=100%><tr><td>";
echo "<a href=\"index.php\">[home]</a>";
echo "<td align=right><a href=\"" . $base . "language=en\">English</a> - ";
echo "<a href=\"" . $base . "language=kr\">Korean</a> - ";
echo "<a href=\"" . $base . "language=jp\">Japanese</a> - ";
echo "<a href=\"" . $base . "language=tw\">Taiwan</a> - ";
echo "<a href=\"" . $base . "language=cn\">China</a></td></tr><table><br>\n";
echo "<table width=740 border=0 cellpadding=0 cellspacing=0>";
echo "<tr><td width=\"100%\">\n\n";
}

function l2dp_footer()
{
echo "</td></tr></table><p>"
. "<a href=\"http://www.mithral.com/~beberg/L2DP/\">L2DP</a> data from "
. gmdate('Y-M-d H:i:s \U\T\C', time() ) . "</p>\n";
echo "</body></html>";
}

function l2dp_connect( $database )
{
// PostgreSQL version
return pg_connect( "host=localhost user=username dbname=$database" );

// MySQL version
//$c = mysql_connect( "localhost", "user", "password" );
//mysql_select_db( $database );
//return $c;
}

function l2dp_disconnect( $db_conn )
{
pg_close( $db_conn );
}

?>


Page 2
<?php
require 'L2DP.php';
l2dp_header();
echo "<title>L2DP - Monsters</title>";
l2dp_body();
$dbc = l2dp_connect( "l2" );

if ( isset( $_REQUEST['id'] ) )
{ $id = $_REQUEST['id']; }
if ( isset( $_REQUEST['lo'] ) )
{ $lo = $_REQUEST['lo']; }
if ( isset( $_REQUEST['hi'] ) )
{ $hi = $_REQUEST['hi']; }
if ( isset( $_REQUEST['type'] ) )
{ $type = $_REQUEST['type']; }

// Abilities:
// s_floating_target - Flying (extra damage from arrows)
// s_burning_wood - Plant (extra damage from fire/arrows?)
// s_unholy - Unholy/Undead (extra damage from holy)
// s_golem_body - Golem skin (reduced damage from arrows/daggers)
// s_soft_bones - Skeletal (extra damage from blunts)
// s_insect_skin - Insect property
// s_wind_feature - Wind property
// s_water_feature - Water property
// s_fire_feature - Fire property
// s_rg_ant_body - Royal Guard only body (not sure what it does)
// s_queen_ant_body - Queen ant only body (not sure what it does)
// s_full_magic_defence - Guessing NPC only, immune to magic

if ( !isset( $id ) )
{
if ( isset( $type ) && $type == 'unknown' )
{
$sql = "SELECT DISTINCT M.id, M.name, M.level, M.aggro, M.hp, M.mp,
M.exp, M.sp, M.npc, M.attack_range, N.title, N.name as name_lang
FROM Monsters as M
LEFT JOIN NpcNames as N
ON ( M.id = N.id AND N.language = '$l2dp_lang' )
WHERE ( M.npc IS NULL OR ( M.npc = 0 AND ( M.level IS NULL ) ) )
ORDER BY N.name;";

echo "<h3>Monsters - Unknown Level or NPC status</b></h3>";
}
elseif ( isset( $type ) && $type == 'undead' )
{
$sql = "SELECT DISTINCT M.id, M.name, M.level, M.aggro, M.hp, M.mp,
M.exp, M.sp, M.npc, M.attack_range, N.title, N.name as name_lang
FROM Monsters as M
LEFT JOIN NpcNames as N
ON ( M.id = N.id AND N.language = '$l2dp_lang' )
WHERE abilities LIKE '%s_unholy%'
ORDER BY level, N.name;";

echo "<h3>Monsters - Undead</b></h3>";
}
else
{
if ( !isset($hi) && !isset($lo) )
{
$lo = 1; $hi = 10;
}
$sql = "SELECT DISTINCT M.id, M.name, M.level, M.aggro, M.hp, M.mp,
M.exp, M.sp, M.npc, M.attack_range, N.title, N.name as name_lang
FROM Monsters as M
LEFT JOIN NpcNames as N
ON ( M.id = N.id AND N.language = '$l2dp_lang' )
WHERE M.level >= $lo AND M.level <= $hi AND M.npc = 0
ORDER BY level, N.name;";

echo "<h3>Monsters - Level: ".$lo." - ".$hi."</h3>";
}

echo '<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr><th>Name<th>Lvl<th>Attitude<th>HP<th>MP<th>Exp <th>SP<th>Attack Range</tr>';

//echo "<pre>", $sql, "</pre>";
$result = mysql_query( $sql );

while ( $mob = mysql_fetch_array( $result ) )
{
{ $name = $mob['name_lang'];
}
if ( strlen( $mob['title'] ) > 0 )
{
$name = $mob['title'] . " " . $name;
}

if ( ( preg_match( "/_hold$/", $mob['name'] ) )
|| ( preg_match( "/^h_/", $mob['name'] ) )
|| ( preg_match( "/^b02_/", $mob['name'] ) ) )
{
$name = $name . " B";
}

$id = $mob['id'];

if ( $mob['level'] > 0 )
{ $lvl = $mob['level']; }
else
{ $lvl = '?'; }

if ($mob['hp'] > 0)
{ $hp = number_format($mob['hp']); }
else
{ $hp = '?'; }

if ($mob['mp'] > 0)
{ $mp = number_format($mob['mp']); }
else
{ $mp = '?'; }

if ($mob['exp'] > 0)
{ $exp = number_format($mob['exp']); }
else
{ $exp = '?'; }

if ($mob['sp'] > 0)
{ $sp = number_format($mob['sp']); }
else
{ $sp = '?'; }

if ( $mob['aggro'] == '1' )
{ $atype = "Aggressive"; }
elseif ( $mob['aggro'] == '0' )
{ $atype = "Passive"; }
else
{ $atype = '?'; }

if ( $mob['attack_range'] > 0 )
{ $arange = $mob['attack_range']; }
else
{ $arange = '?'; }

echo "<tr><td align=left><a href=monsters.php?id=$id>$name</a>"
. "<td align=center>$lvl<td align=center>$atype<td align=center>$hp"
. "<td align=center>$mp<td align=center>$exp<td align=center>$sp"
. "<td align=center>$arange</tr>\n";
}

echo "</table>";
}
else
{
// have an id

$sql = "SELECT DISTINCT M.id, M.name, M.level, M.aggro, M.hp, M.mp,
M.exp, M.sp, M.phys_attack, M.phys_def, M.magic_attack, M.magic_def,
M.align, M.attack_range, N.name as name_lang
FROM Monsters AS M
LEFT JOIN NpcNames as N
ON ( M.id = N.id AND N.language = '$l2dp_lang' )
WHERE M.id = $id;";

//echo "<pre>", $sql, "</pre>";
$result = mysql_query( $dbc, $sql );
$mob = mysql_fetch_array( $result );

$name = $mob['name_lang'];
$id = $mob['id'];

if ( $mob['level'] > 0 )
{ $lvl = $mob['level']; }
else
{ $lvl = '?'; }

if ($mob['hp'] > 0)
{ $hp = number_format($mob['hp']); }
else
{ $hp = '?'; }

if ($mob['mp'] > 0)
{ $mp = number_format($mob['mp']); }
else
{ $mp = '?'; }

if ($mob['exp'] > 0)
{ $exp = number_format($mob['exp']); }
else
{ $exp = '?'; }

if ($mob['sp'] > 0)
{ $sp = number_format($mob['sp']); }
else
{ $sp = '?'; }

if ( $mob['aggro'] == '1' )
{ $atype = "Aggressive"; }
elseif ( $mob['aggro'] == '0' )
{ $atype = "Passive"; }
else
{ $atype = '?'; }

if ($mob['phys_attack'] > 0)
{ $patk = $mob['phys_attack']; }
else
{ $patk = '?'; }

if ($mob['phys_def'] > 0)
{ $pdef = $mob['phys_def']; }
else
{ $pdef = '?'; }

if ($mob['magic_attack'] > 0)
{ $matk = $mob['magic_attack']; }
else
{ $matk = '?'; }

if ($mob['magic_def'] > 0)
{ $mdef = $mob['magic_def']; }
else
{ $mdef = '?'; }

if ($mob['align'] != 0)
{ $align = $mob['align']; }
else
{ $align = '?'; }

if ( $mob['attack_range'] > 0 )
{ $arange = $mob['attack_range']; }
else
{ $arange = '?'; }

echo '<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td colspan=4 align=center><b>Monster</b>
<td align=center><b>Lvl</b>
<td align=center><b>Attitude</b>
<td align=center><b>HP</b>
<td align=center><b>MP</b>
</tr>';

echo "<tr>
<td colspan=4 align=center>$name
<td align=center>$lvl
<td align=center>$atype
<td align=center>$hp
<td align=center>$mp
</tr>";

echo '<tr>
<td align=center><b>P.Atk</b>
<td align=center><b>P.Def</b>
<td align=center><b>M.Atk</b>
<td align=center><b>M.Def</b>
<td align=center><b>Exp</b>
<td align=center><b>SP</b>
<td align=center><b>Align</b>
<td align=center><b>Atk Range</b>
</tr>';

echo "<tr><td align=center>$patk
<td align=center>$pdef
<td align=center>$matk
<td align=center>$mdef
<td align=center>$exp
<td align=center>$sp
<td align=center>$align
<td align=center>$arange</tr>";

echo "<tr><td colspan=8><b>Drops:</b><br>";

$sql = "SELECT D.min, D.max, D.sweep, D.percentage, I.id, N.name
FROM Drops as D
JOIN Items as I
ON ( D.npc_id = $id AND I.id = D.item_id )
LEFT JOIN ItemNames as N
ON ( N.language = '$l2dp_lang' AND I.id = N.id )
ORDER BY D.sweep, D.percentage DESC;";

//echo "<pre>" . $sql . "</pre>";
$result = mysql_query( $dbc, $sql );

$swept = 0;
while ( $drop = mysql_fetch_array( $result ) )
{
if ( $drop['sweep'] == 1 )
{
if ( $swept == 0 )
{
echo '<br><br><b>Sweep:</b><br>';
$swept = 1;
}
echo '<a href="item.php?id=' . $drop['id'] . '">'
. $drop['name'] . '</a>'
. ' (' . $drop['percentage'] . '%) ';
}
else
{
if ( $drop['min'] != $drop['max'] )
{
echo '<a href="item.php?id=' . $drop['id'] . '">'
. $drop['name'] . '</a>'
. ' [' . $drop['min'] . '-' . $drop['max'] . ']'
. ' (' . $drop['percentage'] . '%), ';
}
else
{
echo '<a href="item.php?id=' . $drop['id'] . '">'
. $drop['name'] . '</a>'
. ' (' . $drop['percentage'] . '%), ';
}
}
}

echo "</tr></table>";
}

l2dp_disconnect( $dbc );
l2dp_footer();
?>
Thx for the help by the way.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 01-31-06, 02:54 PM
Sheepymot's Avatar
Sheepymot Sheepymot is offline
Newbie Coder
 
Join Date: Jan 2006
Location: England
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Code:
// MySQL version
//$c = mysql_connect( "localhost", "user", "password" );
//mysql_select_db( $database );
//return $c;
You can edit that to the details your host gives you.

For example:

$c = mysql_connect("localhost", "tinkeringtoad", "supersecretpassword");

You can then edit $database to "my_database" or whatever it's called. (Remember the quotes).

Oh, and uncomment the code by removing the //'s.

You will then have to comment the PostGres code by adding //'s to the beggining of the line.

So the code

PHP Code:

function l2dp_connect$database )

{
// PostgreSQL version
//return pg_connect( "host=localhost user=username dbname=$database" ); 

// MySQL version
$c mysql_connect"localhost""user""password" );
mysql_select_db$database );
return 
$c;
}

function 
l2dp_disconnect$db_conn )
{
mysql_close$db_conn ); 
}

// call it by using

l2dp_connect("databasename"); 
Hoep that helps you, if you are still struggling - reply and I'll help you more.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 01-31-06, 03:13 PM
TheTinkeringToad TheTinkeringToad is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Bingo
I have no idea i tried this same thing and i got a parsing error on the second php page doh oh well i must have used a key that was wrong as my typing sucks and i didnt notice
Thank you so very much foryour reply
have a wonderful day and understand that someone loves you out in the world today LOL
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 01-31-06, 03:14 PM
Sheepymot's Avatar
Sheepymot Sheepymot is offline
Newbie Coder
 
Join Date: Jan 2006
Location: England
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Hey, no problem - glad I could help
__________________
PHPGurus - Free PHP Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 01-31-06, 04:23 PM
TheTinkeringToad TheTinkeringToad is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Eeek ok having a few more problems i think.

PHP Code:

   $class $_REQUEST['class'];

  if ( 
$class "" )
  {
    
$class "";
  } 
This seems to be the culprit yet i have no idea something about undefined index class. Any ideas on how to fix this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 01-31-06, 05:11 PM
Sheepymot's Avatar
Sheepymot Sheepymot is offline
Newbie Coder
 
Join Date: Jan 2006
Location: England
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
That code is pointless and makes no sense!

The code you posted is basically saying that if it is empty make it empty. Delete it, I'm sure it won't matter.
__________________
PHPGurus - Free PHP Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 01-31-06, 06:06 PM
TheTinkeringToad TheTinkeringToad is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Ok here is the page and it seems many pages are very similar so if we can get this to work maybe the others will be not so hard to do there are about 8 pages and near all of them are like this in form.
Im definatley getting errors regarding undefined variables or indexes relating to $class and $l2dp_lang'
If i delete them nothing happens as of the moment nothing will show on the page when accessed.
I know the database access page works L2DP.php as i have one page that is accessing the db with no problem.

PHP Code:

<?php

require 'L2DP.php';
l2dp_header();
echo 
"<title>L2DP - Skills</title>";
l2dp_body();
$dbc l2dp_connect"l2" ); 

  
$class $_REQUEST['class'];
  if ( 
$class == "" )
  {
    
$class "";
  }

$sql "SELECT C.id, C.name AS c_name, parents, min_level, max_level,
    S.name AS s_name
  FROM Classes AS C, SysStrings as S
  WHERE C.name = '
$class' AND S.language = '$l2dp_lang' AND C.sys_id = S.id;";

  
//echo "<pre>" . $sql . "</pre>";
  
$result mysql_query$sql ); 
  
$class_info mysql_fetch_array$result );

// parents

?>
<table border="0" cellpadding="3" cellspacing="0" width="100%"><tr>
<td align="center" width="33%">
<?php

  $parent 
array_popsplit";"$class_info['parents'] ) );

$sql "SELECT S.name
  FROM Classes AS C, SysStrings as S
  WHERE C.name = '
$parent' AND S.language = '$l2dp_lang' AND C.sys_id = S.id;";

  
//echo "<pre>" . $sql . "</pre>";
  
$result mysql_query(  $sql ); 
  
$parent_info mysql_fetch_array$result );

  echo 
"<p><a href=\"skills.php?class=" $parent "\">"
    
$parent_info['name'] . "</a></p>\n";

// self

?>
<td align="center" width="33%">
<?php

  
echo "<h2>" $class_info['s_name'] . "<br>Level: "
    
$class_info['min_level'] . " - " $class_info['max_level'] . "</h2>\n";

// children

?>
<td align="center" width="33%">
<?php

  
if ( $class_info['parents'] == "" )
  {
    
$tmp $class;
  }
  else
  {
    
$tmp $class_info['parents'] . ";" $class;
  }

$sql "SELECT C.name AS c_name, S.name AS s_name
  FROM Classes AS C, SysStrings as S
  WHERE C.parents = '
$tmp' AND S.language = '$l2dp_lang' AND C.sys_id = S.id
  ORDER BY S.name;"
;

  
//echo "<pre>" . $sql . "</pre>";
  
$result mysql_query(  $sql ); 

  echo 
"<p>";
  while( 
$child == mysql_fetch_array$result ) ) 
  { 
    echo 
"<a href=\"skills.php?class=" $child['c_name']. "\">"
      
$child['s_name'] . "</a><br>\n";
  }
  echo 
"</p></tr></table>\n";

// skill list

  
$ancestors "";
  if ( 
strlen$class_info['parents'] ) > )
  {
    
$par split";"$class_info['parents'] );
    foreach ( 
$par as $p )
    {
      
// lookup class_id
      
$sql "SELECT id FROM Classes WHERE name = '$p';";
      
$result mysql_query(  $sql ); 
      
$lookup mysql_fetch_array$result );
      
$ancestors .= " OR class_id = " $lookup['id'];
    }
  }

$sql "
  SELECT G.level AS g_level, G.sp_cost, S.id, S.icon,
    S.level AS s_level, S.active, S.magic, S.mp_consume, S.hp_consume,
    S.range, S.skill_time, S.reuse_delay, S.effect, S.magic_level,
    N.name, N.description
  FROM GainSkills as G
  JOIN Skills as S
    ON (
      ( G.class_id = 
$class_info[id] $ancestors )
      AND G.level >= 
$class_info[min_level]
      AND G.level <= 
$class_info[max_level]
      AND G.skill_id = S.id
      AND G.skill_level = S.level
      )
  LEFT JOIN SkillNames as N
    ON ( S.id = N.id AND S.level = N.level AND N.language = '
$l2dp_lang' )
  ORDER BY G.level, S.active, N.name, S.level;"
;

  
//echo "<pre>" . $sql . "</pre>";
  
$result mysql_query(  $sql ); 

  
$my_level 0;
  while ( 
$skill == mysql_fetch_array$result ) ) 
  { 
    if ( 
$skill['g_level'] > $my_level )
    {
      if ( 
$my_level )
      {
        echo 
"</table>\n";
      }
      
$my_level $skill['g_level'];

      echo 
"<h3>Level: " $skill['g_level'] . "</h3>\n";
      echo 
'<table border="1" cellpadding="3" cellspacing="0" width="100%">';
      echo 
'<tr><th colspan="2">Name<th>A/P<th>Magic<th>MP<th>HP<th>Range<th>Cast Time<th>Delay<th>SP Cost<th>Description</tr>';
    }

    echo 
"<tr>";
    if ( 
$skill['icon'] == "" )
    {
      echo 
"<td align=\"center\">-";
    }
    else
    {
      echo 
"<td valign=\"center\" align=\"center\" width=\"32\">"
        
"<img src=\"images/"
        
$skill['icon'] . "\" width=\"32\" height=\"32\" alt=\""
        
$skill['id'] . "\">";
    }
    echo 
"<td>" $skill['name'];
    if ( 
$skill['id'] != 239 )
    {
      echo 
" <b>" $skill['s_level'] . "</b>";
    }
    echo 
"<td>" $skill['active'];

    if ( 
$skill['magic'] == '1' )
    {
      if ( 
strlen$skill['magic_level'] ) > )
      {
        
$magic "Lvl " $skill['magic_level'];
      }
      else
      {
        
$magic "Lvl ??";
      }
    }
    else
    {
      
$magic "-";
    }
    echo 
"<td>" $magic;

    echo 
"<td>" $skill['mp_consume'];
    echo 
"<td>" $skill['hp_consume'];
    echo 
"<td>" $skill['range'];
    echo 
"<td>" $skill['skill_time'];
    echo 
"<td>" $skill['reuse_delay'];

    echo 
"<td align=right>" number_format($skill['sp_cost']);

//    $effect = str_replace( ";", ", ", $skill['effect'] );
//    echo "<td><font size=\"-2\">" . $skill['description']
//      . "<br>[" . $effect . "]" . "</font></tr>\n";

    
echo "<td><font size=\"-2\">" $skill['description'] . "</font></tr>\n";
  }

echo 
"</table>";
l2dp_disconnect$dbc ); 
l2dp_footer();
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 01-31-06, 06:57 PM
TheTinkeringToad TheTinkeringToad is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Ok got things to work for now
Hopefully i wont bother you guys to much more
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #9 (permalink)  
Old 02-01-06, 11:22 AM
Sheepymot's Avatar
Sheepymot Sheepymot is offline
Newbie Coder
 
Join Date: Jan 2006
Location: England
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
lol, glad you could fix it
__________________
PHPGurus - Free PHP Help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #10 (permalink)  
Old 02-01-06, 11:56 AM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by TheTinkeringToad
Eeek ok having a few more problems i think.

PHP Code:

   $class $_REQUEST['class'];

  if ( 
$class "" )
  {
    
$class "";
  } 
As mentioned before, this code is pointless. There's also an error in the IF statement, where you should have a double "==" instead of a single "=". A single "=" will set the var to that value instead of testing the value, but either way the code does nothing useful.
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
IIS MYSQL and PHP nommiiss PHP 6 01-31-06 05:30 PM
WEB HOSTING - $4.99/MONTH For 1GB HD & 25GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 0 11-24-05 07:18 AM
WEB HOSTING - $4.99/MONTH For 1GB HD & 25GB BW! CPanel, PHP, MySQL & MORE! IncognitoNet General Advertisements 0 10-06-05 09:22 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-25-05 12:09 AM


All times are GMT -5. The time now is 12:54 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.