Jump to content

little problem


porko2004

Recommended Posts

<?php
require('config.php');
$sql = "SELECT m.Title as title , f.Reg_URL as reg
        FROM
                website_main as m   
                JOIN               
                website_front as f               
         LIMIT 0,01
              ";


$result = @mysql_query($sql) or die(mysql_error());
echo "<table border='3'>";
echo "<font size='9'><tr> <th><FONT COLOR=red><center>Title</center></font></th> <th><FONT COLOR=red>reg</th> </tr></font>";
// 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
$reg = $row['reg'];
      echo "<tr><td bgcolor=''><center>";       
   echo $row['title'];
   echo "</td><td bgcolor=''><center>";
echo '.$reg.';
   echo "</td></tr>"; 
}
?>

 

I got a problem i try to use an attribute for $reg but only appears as .$reg. on website anyone know why?

Parts i have problems with are $reg = $row['reg']; and echo '.$reg.';.

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/245566-little-problem/
Share on other sites

4 different options:

 

include  -- will include the file, and you can add it more times on same page

require -- does the same but script will not continue if it cannot find the file

include_once -- same as include but will only let you include it once, so no duplications occur

require_once -- same as require, but also just once.

Link to comment
https://forums.phpfreaks.com/topic/245566-little-problem/#findComment-1261276
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.