Jump to content

enhu

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.cebutechforum.com

Profile Information

  • Gender
    Not Telling

enhu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. my host dont reply so soon. i have create user in the database with my name before with all the priveledges. dyou think i'll have to create another user with the name "root"? i'm really new to this database and php thing.
  2. thanks. i think the first error is now fixed. thanx.
  3. here's the connection.php: <?php require("constants.php"); $connection = mysql_connect(DB_SERVER,DB_USER,DB_PASS); if (!$connection) { die("Database connection failed: " . mysql_error()); } $db_select = mysql_select_db(DB_NAME,$connection); if (!$db_select) { die("Database selection failed: " . mysql_error()); } ?> and this is the index.php: <?php require_once("includes/connection.php"); ?> <?php require_once("includes/functions.php"); ?> <?php find_selected_page(); ?> <?php include("includes/header.php"); ?> <table width="276%" id="structure"> <tr> <td width="212" id="navigation"> <?php echo public_navigation($sel_subject, $sel_page); ?> </td> <td width="700" id="page"> <?php if ($sel_page) { ?> <h2><?php echo htmlentities($sel_page['menu_name']); ?></h2> <div class="page-content"> <?php echo strip_tags(nl2br($sel_page['content']), "<b><br><p><a>"); ?> </div> <?php } else { ?> <h2>Welcome to My Site</h2> <p> </p> <?php } ?> </td> </tr> </table> <?php include("includes/footer.php"); ?> pleeeease pleeease pleeease help. i upload the whole www folder and this is what the error said: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/.../public_html/enhu.com/includes/connection.php on line 5 Database connection failed: Access denied for user 'root'@'localhost' (using password: YES) what possibly have i done? please help me fix.
  4. Warning: require_once(includes/connection.php) [function.require-once]: failed to open stream: No such file or directory in /home/.../public_html/enhu.com/index.php on line 1 Fatal error: require_once() [function.require]: Failed opening required 'includes/connection.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/.../public_html/enhu.com/index.php on line 1 how must i solve this error?
  5. I'm using wamp to build my website. this is just a very simple one. its great and it works in localhost environment. This time, i wanna publish it in the net however i don't know what to do. Please help me. i was just looking for about a hour what to do after accessing my cpanel. i can see the mysql database wizard, phpmyadmin and all. but i don't have any idea what to do. where shall i start? how must i import those .php files?
  6. Fatal error: Call to undefined function get_the_subject_by_id() in C:\wamp\www\...\del_subject.php on line 10. This is the page for deleting a navigation links. so when i delete a page this error message appear and it wont delete the link. Please help me with this. <?php if (intval($_GET['subj']) == 0) { redirect_to("main.php"); } $id = mysql_prep($_GET['subj']); if ($subject = get_the_subject_by_id($id)) { $query = "DELETE FROM subjects WHERE id = {$id} LIMIT 1"; $result = mysql_query($query, $connection); if (mysql_affected_rows() == 1) { redirect_to("main.php"); } else { echo "<p>Subject deletion failed. </p>"; echo "<p>" . mysql_error() . "</p>"; echo "<a href=\"main.php\">Back to Main Page</a>"; } } else { redirect_to("main.php"); } ?> Thanks.
  7. you were right. i take the ".$row["positon"] away and leave the while statement to this hile ($row = mysql_fetch_array($result)) { echo $row["menu_name"]."<br />"; } and it works. thank you. you didnt seem to drop my faith at all.
  8. i'm not really sure how to fix this, does this mean that i have to input it again to the database or should i replace the syntax so it would function?
  9. Notice: Undefined index: positon in C:\wamp\www\enhu\content.php on line 15 About Enhu $result = mysql_query("SELECT * FROM subjects", $connection); if (!$result) { die("Database query failed: " . mysql_error()); } while ($row = mysql_fetch_array($result)) { echo $row["menu_name"]." ".$row["positon"]."<br />"; } The line 15th line the while statement:
×
×
  • 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.