Jump to content

$sql :S


Boxerman

Recommended Posts

Hey guys

 

im trying to enter this code...

 

<?php
$con = mysql_connect("localhost","*****","*****");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("movies", $con);

$result = mysql_query("SELECT * FROM news");

while($row = mysql_fetch_assoc($result)){

    
    echo '<div style="width:400px; padding:3px; margin-bottom:8px; float:left; clear:both;">';
    
    
    echo '<div style="width:90px; float:left;">';
    echo '<img src = "'.$row['image'].'" style="border:2px #333333 solid;">';
    echo '</a>';
    echo '</div>';
    
    
    echo '<div style="width:300px; float:right;">';
    echo '<h3>'.$row['title'].'</h3>';
    echo $row['story'];
    echo '</div>';

echo '</div>';
}
?>

 

but the outcome is this

 

http://www.uksbestsite.com/movies/index.php?page=news

 

the echos dont seem to be working :S

 

this is the full file

<?php

if ( !defined( 'in_web' ) ) exit( 'Stop here !!!!!' );

unset($module);
$module["text"] = support();
function support()
{
global $skn, $db, $Lang;
$skn->set_file('support','news/news.php');

$con = mysql_connect("localhost","****","*****");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("movies", $con);

$result = mysql_query("SELECT * FROM news");

while($row = mysql_fetch_assoc($result)){

        echo '<div style="width:400px; padding:3px; margin-bottom:8px; float:left; clear:both;">';
    
        echo '<div style="width:90px; float:left;">';
    echo '<img src = "'.$row['image'].'" style="border:2px #333333 solid;">';
    echo '</a>';
    echo '</div>';
    
    
    echo '<div style="width:300px; float:right;">';
    echo '<h3>'.$row['title'].'</h3>';
    echo $row['story'];
    echo '</div>';

echo '</div>';
}

$skn->set_var('support_online'	,$Lang->Mtextkey('support_online','support_online'));
$sql="SELECT * FROM tbl_site_info WHERE $Lang->LangRequirement('tbl_site_info')";
$item = $db->sql_get_first($sql);
$skn->set_var('yahoo'	,$result['C_Yahoo']);
$skn->set_var('skype'	,$result['C_Skype']);
$html = $skn->output('support');
$skn->vreset();
return $html;
}
$Out->PrintModule($module["text"]);
// -> Main

?>

Link to comment
https://forums.phpfreaks.com/topic/153838-sql-s/
Share on other sites

http://www.uksbestsite.com/movies/index.php?page=news

 

this is the code now...

 

<?php
$con = mysql_connect("localhost","*****","*****");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("movies", $con);

$result = mysql_query("SELECT * FROM news") or die(mysql_error());
$num = mysql_num_rows($result);
echo "<p><h1>".$num."</h1></p>";

while($row = mysql_fetch_assoc($result)){

    
    echo '<div style="width:400px; padding:3px; margin-bottom:8px; float:left; clear:both;">';
    
    
    echo '<div style="width:90px; float:left;">';
    echo '<img src = "'.$row['image'].'" style="border:2px #333333 solid;">';
    echo '</a>';
    echo '</div>';
    
    
    echo '<div style="width:300px; float:right;">';
    echo '<h3>'.$row['title'].'</h3>';
    echo $row['story'];
    echo '</div>';

echo '</div>';
}
?>

Link to comment
https://forums.phpfreaks.com/topic/153838-sql-s/#findComment-809440
Share on other sites

Look Boxerman,

  You've managed somehow to get 100+ posts to this forum apparently without being even remotely aware of the rules of the board.  One of those rules is that you should post to the right subforum (in this case your entire thread is about the customization of some 3rd party script, but you have yet to let anyone know what that script is).  So not only are you not being forthcoming about your real question (in this case how to customize some unknown script package you didn't write, but you also posted this with a subject indicating it's about sql, which it isn't, in the wrong subforum.  Then to top it all off, you don't provide any code.  This whole thread is a waste of time.   

Link to comment
https://forums.phpfreaks.com/topic/153838-sql-s/#findComment-810342
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.