Jump to content

lostintranslation

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by lostintranslation

  1. http://aich.aiistudentwork.com/students/erinmoll/Ebb+Flow_S/index2.php Hi everyone, I am in school for Interactive Media & Web Design. I have a project due tomorrow and need help getting to the bottom of this issue. Been trying for a while to get this to work. Basically, I have a main navigation and a sub-nav. The sub-nav is to take the user to the work produced by the students of various majors. I have information being pulled from the database. As you can see from clicking though the site, the main navigation works by switching content--Home, About, Contact, Events, Gallery, Staff. However Majors and its sub nav just stay on the home page. I played around with the body_content, majors, global nav, and section pages. Also adjusted the record sets. Does anyone have an idea? I really appreciate it! My prof thought it may be an issue with case sensitivity of around the parameters (What does that mean?), the content switcher, or the record sets to the majors. I used the http://phpcodechecker.com/ and it highlighted something in the syntax. Then, Dreamweaver said that it made it invalid code. Please help. This project is due tomorrow. I wasn't procrastinating, just a noob with PHP, which makes me a bit slow. GLOBAL NAV <div id="nav1"> <ul> <li><a href="index2.php"<?php if ($section == 'home') {echo 'class="current"'; } ?>>Home</a></li> <li><a href="index2.php?section=about"<?php if ($section == 'about') {echo 'class="current"'; } ?>>About</a></li> <li> <a href="index2.php?section=contact"<?php if ($section == 'contact') {echo 'class="current"'; } ?>>Contact</a></li> </ul> </div> <div id="nav2"> <ul> <li><a href="index2.php?section=majors"<?php if ($section == 'majors') {echo 'class="current"';}?>>Majors</a> <ul > <li class="med_nav"><a href="index2.php?section=majors&sub=culinary"<?php if ($sub== 'culinary') {echo 'class="current"';}?>>Culinary</a></li> <li class="med_nav"><a href="index2.php?section=majors&sub=fashion"<?php if ($sub == 'fashion') {echo 'class="current"';}?>>Fashion</a></li> <li class="smaller_nav"><a href="index2.php?section=majors&sub=film"<?php if ($sub == 'film') {echo 'class="current"';}?>>Film</a></li> <li class="med_nav"><a href="index2.php?section=majors&sub=graphic"<?php if ($sub == 'graphic') {echo 'class="current"';}?>>Graphic</a></li> <li class="smaller_nav"><a href="index2.php?section=majors&sub=web"<?php if ($sub == 'web') {echo 'class="current"';}?>>Web</a></li> </ul> </li> <li><a href="index2.php?section=events"<?php if ($section == 'events') {echo 'class="current"'; } ?>>Events</a></li> <li><a href="index2.php?section=gallery"<?php if ($section == 'gallery') {echo 'class="current"'; } ?>>Gallery</a></li> <li><a href="index2.php?section=staff"<?php if ($section == 'staff') {echo 'class="current"'; } ?>>Staff</a></li> </ul> </div> MAJORS <?php require_once('Connections/conn_ebbflow.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_rs_content = "-1"; if (isset($_GET['sub'])) { $colname_rs_content = $_GET['sub']; } mysql_select_db($database_conn_ebbflow, $conn_ebbflow); $query_rs_content = sprintf("SELECT * FROM ef_content WHERE title = 'majors'", GetSQLValueString($colname_rs_content, "text")); $rs_content = mysql_query($query_rs_content, $conn_ebbflow) or die(mysql_error()); $row_rs_content = mysql_fetch_assoc($rs_content); $totalRows_rs_content = mysql_num_rows($rs_content); ?> <h1><?php echo $row_rs_content['title']; ?></h1> <h2><?php echo $row_rs_content['sub-title']; ?></h2> <div><?php echo $row_rs_content['body_content']; ?></div> <?php mysql_free_result($rs_content); ?> SECTION <?php require_once('Connections/conn_ebbflow.php'); ?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $colname_rs_content = "-1"; if (isset($_GET['section'])) { $colname_rs_content = $_GET['section']; } mysql_select_db($database_conn_ebbflow, $conn_ebbflow); $query_rs_content = sprintf("SELECT * FROM ef_content WHERE title = %s", GetSQLValueString($colname_rs_content, "text")); $rs_content = mysql_query($query_rs_content, $conn_ebbflow) or die(mysql_error()); $row_rs_content = mysql_fetch_assoc($rs_content); $totalRows_rs_content = mysql_num_rows($rs_content); ?> <h1><?php echo $row_rs_content['title']; ?></h1> <h2><?php echo $row_rs_content['sub-title']; ?></h2> <div><?php echo $row_rs_content['body_content']; ?></div> <?php mysql_free_result($rs_content); ?>
  2. Yes, and thanks so much for checking back in. You were right about: Web URL should be http://localhost/ I adjusted Local site folder & Server folder: /Applications/MAMP/htdocs/ I also needed my connections folder at the root level.
  3. Thank you for your reply. I clicked on "Set to default MySQL and Apache Ports". Then, it set it to Apache port 80 and MySQL port 3306. Both the Apache and MySQL show up green. But then, an error pops up saying that Safari won't connect to the server. Same thing happened in Safari. I set up a remote and testing server in the site definition but I could have done it wrong. Local site folder: /Applications/MAMP Servers: Server Name: localhost Connection using: Local/Network Server Folder: /Applications/MAMP Web URL: http://[my computer's website number]:8888/ Advanced: Remote Server: Maintain synchronization information Testing Server: PHP MySQL When they are reset to 8888 and 8889, they show up again in Safari. However, even though I have the site set up in Manage Sites, it does not show up on the site under databases.
  4. Hi, I am currently taking a PHP class. I have MAMP on my mac and using PHPMyAdmin for my database. I can get in to PHPMyAdmin from MAMP. I also can test my website online through MAMP: http://localhost:8888...I know this because when I made a change earlier today in the CSS, it updated online. My files are in htdocs folder. When in Dreamweaver, I am trying to set up MYSQL Connection. I am not making a connection. I was trying to use default settings that MAMP said to use. Connection name: (is this localhost?) MYSQL server: (is this localhost?) User name: root Password: root Database: When trying to connect to database, it goes through the testing loop and then I get: An unidentified error has occured. Then the next error (attached). Can anyone help? If I am not being explicit enough, please let me know so I can clarify anything.
×
×
  • 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.