Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsWeb Design & DevelopmentServer Side ScriptingOther Languages right
left right
The Seventh Hoka...
post Sep 27 2009, 07:11 PM
Post #1


Member
**

Group: Members
Posts: 90
Joined: 29-May 09
Member No.: 97,073



CODE
<?php
$ss= mysqli_connect($host,$user,$pass,$db) or die("ya did it wrong");//connect to db

function createScroll($x)
{
$xx=$x;
$ssq= "INSERT INTO scrolls(name) VALUES ('Dana')";

$ssres= mysqli_query($xx,$ssq) or die ("You messed xxxx");
}



createScroll($ss);
?>



for some reason i keep getting the error for the query. it can't connect to the DB no matter what i do. do i need to return any info to bring it back to the main program so it can update the DB?

note that i tried it without the function braces and the db still wasnt updated
Go to the top of the page 
 
  + Quote Post

Posts in this topic

 Reply to this topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 19th May 2013 - 05:22 PM