Jump to content

not sure what's wrong- connection to DB


the 7th Hokage

Recommended Posts

<?php
include "c1.inc";

$cxn=mysqli_connect($host,$user,$pass,$db) or die("ya did it wrong");
$sumqry =" SELECT * FROM `summoncreatures` WHERE `type`='Small' AND `size`='Undead' "; 
$sumresult= mysqli_query($cxn,$sumqry)or die('Ya did it wrong.');
$suminfo=mysqli_fetch_assoc($sumresult);//load info into var

echo $suminfo[WS];
echo "Hey";
?>

 

 

simple code. i just want to make sure it's connecting to the database. the thing is.. it's not.

 

and im not getting any errors or anything like that.

i tripple checked it and i can't really spot anything so i was wondering if anyone sees anything that sticks out or can help me. It would be greatly appreciated.

Link to comment
https://forums.phpfreaks.com/topic/179566-not-sure-whats-wrong-connection-to-db/
Share on other sites

the thing is.. it's not.
How do you know it is not. You did not state in your post what you see in front of you when you try it that would tell you or us what it did or did not do.

 

and im not getting any errors or anything like that.
'anything like that' is not a programming term. Without a specific statement of what it did do, it is not possible to narrow down the dozen possible problems in order to help you with the one problem you are having.

 

Short answer - please tell us what you do see in front of you when you try it.

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.