Jump to content

GM Revan

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

GM Revan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks alot Voip03 it worked!!! Seems it didn't need to go up one folder for some reason like in some other files that I used the same ../ path. You saved me from multiple file mysql changes in the future.
  2. Yes tnx I actually found that I couldn't connect or select the database. The include files of my db connect didn't work on just functions.php for some strange reason. So I put the entire mysql_connect and mysql_select for it to actually make them work.Whats up with the include not working? The path is the same as the other files at similar locations but no matter how I change the path it throws me this errors (if I use the include functions): Warning: include(../func/config.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\MyWebsite\poll\functions.php on line 6 Warning: include() [function.include]: Failed opening '../func/config.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\MyWebsite\poll\functions.php on line 6 Warning: include(../func/init.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\MyWebsite\poll\functions.php on line 8 Warning: include() [function.include]: Failed opening '../func/init.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\MyWebsite\poll\functions.php on line 8 The fuctions.php file resides in "htdocs\MyWebsite\poll\fuctions.php" The database connect files reside in "htdocs\MyWebsite\func\config.php" and "htdocs\MyWebsite\func\init.php" (They are both needed to make the connection to the db and they work on other files that i have included them) The includes in functions.php that do no work have this path: include('../func/config.php'); include('../func/init.php');
  3. Full error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\MyWebsite\poll\functions.php on line 28 Been working all day to set up some stuff in my website. Now currently working on the poll. Been stuck on this error and I don't know what to do. That's the function that throws this: Any help would be appreciated. function getPoll($pollID){ $query = "SELECT * FROM polls LEFT JOIN pollAnswers ON polls.pollID = pollAnswers.pollID WHERE polls.pollID = " . $pollID . " ORDER By pollAnswerListing ASC"; $result = mysql_query($query); //echo $query;jquery $pollStartHtml = ''; $pollAnswersHtml = ''; while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $pollQuestion = $row['pollQuestion']; $pollAnswerID = $row['pollAnswerID']; $pollAnswerValue = $row['pollAnswerValue']; if ($pollStartHtml == '') { $pollStartHtml = '<div id="pollWrap"><form name="pollForm" method="post" action="poll/functions.php?action=vote"><h3>' . $pollQuestion .'</h3><ul>'; $pollEndHtml = '</ul><input type="submit" name="pollSubmit" id="pollSubmit" value="Vote" /> <span id="pollMessage"></span></form><>'; } $pollAnswersHtml = $pollAnswersHtml . '<li><input name="pollAnswerID" id="pollRadioButton' . $pollAnswerID . '" type="radio" value="' . $pollAnswerID . '" /> ' . $pollAnswerValue .'<span id="pollAnswer' . $pollAnswerID . '"></span></li>'; $pollAnswersHtml = $pollAnswersHtml . '<li class="pollChart pollChart' . $pollAnswerID . '"></li>'; } echo $pollStartHtml . $pollAnswersHtml . $pollEndHtml; }
×
×
  • 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.