Jump to content

blufish

Members
  • Posts

    200
  • Joined

  • Last visited

    Never

Posts posted by blufish

  1. Use some form of redirect.

     

    To make it accept it for PHP-include just set a variable like $dummy. and then test with foo.php

     

    if (!isset($dummy)) {
    redirect
    }
    

     

    That way, $dummy will only be set when you PHP-include or whatever.  If you are putting it in an iFrame you could have it try this.

     

    <script type='text/javascript'>
    if (parent.location == window.location) {
    parent.location = "http://www.website.com/index.php";
    }
    </script>
    

     

    But that will only work with Javascript-enabled browsers.

     

  2. I don't see the bee he mentioned... Oh well.

     

    Your site is too narrow I wouldn't make it 1024px but AT LEAST 800px.  And if your going to be making website designs, you really should be using tables, its a big turn-off.  I like the quote:

     

    A picture is worth a thousand words.

    A website is worth a million.

     

     

  3. Personal sites can have advertisements.

    I changed the color scheme.

    My site has a point: Me, but mostly I put Humor on it.

    You can critique a lot of stuff, because I have quite a few pages.

    I'll add something like "MarkSwingle.com" to the top of my banner and add more to the homepage, thanks.

     

  4. A doctype isn't going to make your site render exactly the same in all browsers.  Internet Explorer will always mess up when it renders your site, you just have to learn the "hacks" to make it look like it does in all the other browser.  I use XHTML Transitional:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    

     

     

  5. I know how to use Paint Shop Pro, but the site is meant to have a simple design, no images.  And yes, I can host all of the games on my site.  The site is my personal site, but it has mostly humorous stuff on it.

     

    I have made an effort on this site, many many hours, did you just look at the homepage?

     

    I will try to make the pages written better.

  6. Here is the code, I does not return anything...

    <?php
    if (isset($_POST['where'])) {
    $_POST['p'] = $_POST['where'];
    }
    if (!isset($_POST['p'])) {
    $_POST['p'] = "home";
    }
    $current_page = $_POST['p'];
    
    if ($current_page=="home") {
    if (!isset($_POST['sort_by')) {
    $_POST['sort_by'] = "pagetitle";
    }
    if ($_POST['sort_by']=="pagetitle") {
    $sort_pages_by = "page_title";
    }
    if ($_POST['sort_by']=="pagehits") {
    $sort_pages_by = "page_hits";
    }
    if ($_POST['sort_by']=="pagevotes") {
    $sort_pages_by = "vote_good";
    }
    
    if (!isset($_POST['only_show'])) {
    $_POST['only_show'] = "all";
    }
    if ($_POST['only_show']=="all") {
    $page_type = "*";
    }
    if ($_POST['only_show']=="images") {
    $page_type = "images";
    }
    if ($_POST['only_show']=="text") {
    $page_type = "text";
    }
    
    $page_title = "Welcome to Frozenoven!";
    $page_contents = "<p>Welcome to Frozenoven, here you can search our content with our database, </p>";
    $database_connect = mysql_connect("sql204.byethost7.com","b7_2627673","turds12");
    if (!$database_connect) {
    die('Error Connecting to Database: ' . mysql_error());
    }
    
    $select_database = mysql_select_db("b7_2627673_pages", $database_connect);
    if (!select_database)
    {
    die ("Error Selecting Database: " . mysql_error());
    }
    
    $page_contents = $page_contents."<table><tr><th>Page Title</th><th>Thumb Ups!</th><th>Page Hits</th></tr>";
    $page_query = mysql_query("SELECT * FROM page_info WHERE page_type=".$page_type." ORDER BY ".$sort_pages_by) or die(mysql_error());
    while($page_values = mysql_fetch_array($page_query))
    {
    $page_contents =  $page_contents."<tr><td><a href='".$page_values['page_name']."'>".$page_values['page_title'] ."</a></td><td>".$page_values
    
    ['vote_good']."</td><td>".$page_values['page_hits']."</td></tr>";
    }
    $page_contents = $page_contents."</table>";
    mysql_close($database_connect);
    }
    echo page_contents;
    ?>
    

     

     

  7. Okay, I am currently using this code:

    <?php
    $database_connect = mysql_connect
    
    ("sql204.byethost7.com","--3","--");
    if (!$database_connect) {
    die('Error Connecting to Database: ' . mysql_error());
    }
    else {
    echo "Succesfully Connected to Database!";
    }
    
    $select_database = mysql_select_db("b7_2627673_pages", 
    
    $database_connect);
    if (!select_database)
    {
    die ("Error Selecting Database: " . mysql_error());
    }
    else {
    echo "Database Succesfully Selected!";
    }
    
    $page_query = mysql_query("SELECT * FROM page_info") or die
    
    (mysql_error());
    while($page_values = mysql_fetch_array($page_query))
    {
    echo $page_values['page_title'] . " " . $page_values['page_name'];
    echo "<br />";
    }
    mysql_close($database_connect);
    ?>
    

     

    And Getting This Response:

    Succesfully Connected to Database!Database Succesfully Selected! <br /> <br />

     

    I Should Be Getting This Response:

    Succesfully Connected to Database!Database Succesfully Selected! Page 1 pg1.htm<br /> Page 2 pg2.htm<br />

     

    Any Ideas?

     

     

  8. I know you are all really good at MySQL so can you tell me why this is not working?

     

    <?php
    $database_connect = mysql_connect("sql204.byethost7.com","--","--");
    if (!$database_connect) {
    die('Error Connecting to Database: ' . mysql_error());
    }
    else {
    echo "Succesfully Connected to Database!";
    }
    
    $page_query = mysql_query("SELECT * FROM page_info");
    while($page_values = mysql_fetch_array($page_query))
    {
    echo $page_values['page_title'] . " " . $page_values['page_name'];
    echo "<br />";
    }
    mysql_close($database_connect);
    ?>
    

     

    I'm sures its a simple question, but could you please explain what I have to do to fix this because I am new to MySQL.

     

    Thanks,

    Mark Swingle

     

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