Hi guys,
I am struggling a bit with some code.
I have put the code on my own test hosting website yet it is not displaying anything... not even an error message.
Here is the code
<?php
$conn = msqli_connect("xxxxx","xxxxxxx","xxxxxxx","xxxxxxxx")
or die ("Could not connect to mysql because ".mysql_error());
$q = "SELECT * FROM news WHERE newsstatus='Enabled'";
$q = "ORDER BY newsdate DESC";
$result = mysqli_query($conn,$q);
{
while ($row = mysqli_fetch_array($result))
{
echo"
<div class='summary'>
<p><strong>" . $row['newstitle'] . "</strong</p>
" . $row['newstitle'] . "
<p>" . $row['newssnippet'] . "</p>
<p>><img src='http://www.agile-cms.uk.com/news/" . $row['newsimage'] . "' alt='" . $row['newstitle'] . "' /></p>
<p><a href='newsitem?i=" . $row['newsid'] . "'>Read More</a></p>
</div>
";
}
}
?>
Basically I have this php file and another file to display the results of this query using this:
<?php
include("functions/news_fns.php");
?>
When I run the debugger on PHPEdit it displays Fatal error: Call to undefined function msqli_connect() in C:\ On line 2, line 2 being the connection string. I know it isn't the connection string though because it the same connection string I have used in a different file (Which does as it is told) I have literally copied and pasted it.
Any thoughts on where I could be missing something?
Cheers!