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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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