SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 72
  1. #26
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <?
    <HTML><BODY>
    Blah Blah at the top
    // include the main content below
    switch ($_GET['Page']) {
    case 'AddClan' : include('Clans/AddClan.php'); break;
    case 'EditClan' : include('Clans/EditClan.php'); break;
    case 'DeleteClan' : include('Clans/DeleteClan.php'); break;
    case 'AddLanCenter' : include('LanCenters/AddLanCenter.php'); break;
    case 'EditLanCenter' : include('LanCenters/EditLanCenter.php'); break;
    case 'DeleteLanCenter' : include('LanCenters/DeleteLanCenter.php'); break;
    }
    Blah Blah at the bottom
    </BODY></HTML>
    ?>
    Returns this error:
    Parse error: parse error in c:\apache\www\text.php on line 2

    Why is it leaving an error?
    Content Writing Service - Get custom SEO articles for 10$

  2. #27
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone know of tutorials about this topic? ANY! I am so lost.
    Content Writing Service - Get custom SEO articles for 10$

  3. #28
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK - SamSM strong-armed me to throw my opinions in here

    Going right back to the start, think the main benefit of using a single script as a "traffic director" for your site is it makes it easier to cope with (inevitable) change. Certain elements of your site will be "global", such as security, navigation and banners (if you use them) - using a single central script you can easily include these on every other page. The rest simply a job of making "decisions" as to which specific page (I'll call these "views" from now on) to display depending on the URL.

    One theoretical point here, on the subject of how you use URLs to make decisions. Personally I wouldn't use this;

    http://www.yoursite.com/file.php?page=test

    for deciding which "view" to display. There are two types of variable you can pass via the URL which I can "scalar" and "vector" (I studied Physics way back - I guess in programming terms you'd call scalar - indexed and vector - associative). Scalar variables have a value only for example;

    http://www.yoursite.com/index.php/news/latest/

    Here "news" and "latest" are scalar variables ( you can access them by "parsing" $_SERVER['REQUEST_URI'] ). I like to use these sort of variables to make "decisions" about which "view" to display. You can also use .htaccess and mod_rewrite to eliminate the "index.php" from the URL.

    The other sort of vector variable I like to use for passing information to individual "views", for example;

    http://www.yoursite.com/index.php/ne...?sortby=author

    Here $_GET['sortby'] is used to modify the order the latest news in displayed in.

    Of course this a matter of personal preference - this approach helps me keep my code better organised.

    One other thing you can do is "delegate" decisions to other scripts, avoiding the need for massive switch statements or otherwise, for example;

    PHP Code:
    <?php
    // index.php

    // Some function / class that gets scalar variables
    $scalarVars=getScalars(); 

    switch ( 
    $scalarVars[0] ) {
        case 
    'news':
            include (
    'news.php');
        break;
        case 
    'downloads':
            include (
    'downloads.php');
        break;
        default:
            include (
    'default.php');
        break;
    }
    ?>
    OK now if the URL is http://www.yoursite.com/index.php/news/ this will be handled by news.php

    PHP Code:
    <?php
    // news.php

    switch ( $scalarVars[1] ) {
        case 
    'latest':
            
    // display latest news
        
    break;
        default:
            
    // default 'view'
        
    break;
    }
    ?>
    A final note on security; the scripts which get included by index.php should not be available to be access directly i.e. http://www.yoursite.com/news.php should not be allowed - this may allow people to bypass your security for example, depending on how you write your code. Either place these scripts somewhere outside your public web directories or protect them with .htaccess

    Also be careful with this;

    PHP Code:
    <?php
    $file 
    = isset($_GET['page']) ? $_GET['page'] : 'default';
    include(
    $file '.php');
    ?>
    What if someone enters;

    http://www.yoursite.com/index.php?page=dbsettings

    This may not be a train smash but you're allowing people to include files you may not have planned. Recommend something more like;

    PHP Code:
    <?php
    $pages
    =array('news','downloads','links');

    $file in_array($_GET['page'],$pages) ? $_GET['page'] : 'default';
    include(
    $file '.php');
    ?>
    In case the ternary operator is confusing, an 'if' which does the same thing;

    PHP Code:
    <?php
    $pages
    =array('news','downloads','links');

    if ( 
    in_array($_GET['page'],$pages) ) {
        include(
    $_GET['page'] . '.php');
    } else {
        include(
    'default.php');
    }
    ?>
    This is simply an alternative to using switch statments. Hope that helps.

  4. #29
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which is better, switch statements or these
    Code:
    <?php 
    $pages=array('news','downloads','links'); 
    
    $file = in_array($_GET['page'],$pages) ? $_GET['page'] : 'default'; 
    include($file . '.php'); 
    ?> 

    or the if statements? Which do you prefer?
    Content Writing Service - Get custom SEO articles for 10$

  5. #30
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would go with the method that HarryF suggested.

    -Helge

  6. #31
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I got it to display the default page in place, but I still can't get it to execute the "switch". I'm using this code:
    Code:
    <?php 
    $file = isset($_GET['page']) ? $_GET['page'] : 'default'; 
    include($file . '.php'); 
    ?> 


    Please help me with the installation. I've almost got it.
    Content Writing Service - Get custom SEO articles for 10$

  7. #32
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The error you're getting with that switch in because you're placing HTML inside a PHP "block";

    PHP Code:
    <?
    <HTML><BODY>
    Blah Blah at the top
    // include the main content below
    switch ($_GET['Page']) {
    case 
    'AddClan' : include('Clans/AddClan.php'); break;
    case 
    'EditClan' : include('Clans/EditClan.php'); break;
    case 
    'DeleteClan' : include('Clans/DeleteClan.php'); break;
    case 
    'AddLanCenter' : include('LanCenters/AddLanCenter.php'); break;
    case 
    'EditLanCenter' : include('LanCenters/EditLanCenter.php'); break;
    case 
    'DeleteLanCenter' : include('LanCenters/DeleteLanCenter.php'); break;
    }
    Blah Blah at the bottom
    </BODY></HTML>
    ?>
    Is wrong - you need;

    PHP Code:
    <HTML><BODY>
    Blah Blah at the top

    <?php
    // include the main content below
    switch ($_GET['Page']) {
    case 
    'AddClan' : include('Clans/AddClan.php'); break;
    case 
    'EditClan' : include('Clans/EditClan.php'); break;
    case 
    'DeleteClan' : include('Clans/DeleteClan.php'); break;
    case 
    'AddLanCenter' : include('LanCenters/AddLanCenter.php'); break;
    case 
    'EditLanCenter' : include('LanCenters/EditLanCenter.php'); break;
    case 
    'DeleteLanCenter' : include('LanCenters/DeleteLanCenter.php'); break;
    }
    ?>

    Blah Blah at the bottom
    </BODY></HTML>
    As to how you do, switch, if / else, ternary or whatever - choose the one you're most comfortable with.

  8. #33
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can extend this so that you don't have to specify the path to the file in the url.
    PHP Code:
    $pages = array('AddClan'         => 'Clans/AddClan.php',
                   
    'EditClan'        => 'Clans/EditClan.php',
                   
    'DeleteClan'      => 'Clans/DeleteClan.php',
                   
    'AddLanCenter'    => 'LanCenters/AddLanCenter.php',
                   
    'EditLanCenter'   => 'LanCenters/EditLanCenter.php',
                   
    'DeleteLanCenter' => 'LanCenters/DeleteLanCenter.php'
                  
    );

    if(
    array_key_exists($_GET['page'], $pages)) {
        include 
    $pages[$_GET['page']];
    } else {
        include 
    'default.php';

    -Helge

  9. #34
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I'm happy with this code:
    Code:
    <?php 
    $file = isset($_GET['page']) ? $_GET['page'] : 'default'; 
    include($file . '.php'); 
    ?> 
    It just makes more sense for me to use it, and plus, it's the smallest. I don't have too many server security issues. I don't really care about it.

    How do I get links to work through that code? You know, as in index.php?page=whatever

    Can't seem to get that to work...
    Content Writing Service - Get custom SEO articles for 10$

  10. #35
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using this:
    Code:
    <?php 
    // index.php 
    
    // Some function / class that gets scalar variables 
    $scalarVars=getScalars(); 
    
    switch ( $scalarVars[0] ) { 
    	case 'news': 
    		include ('news.php'); 
    	break; 
    	case 'downloads': 
    		include ('downloads.php'); 
    	break; 
    	default: 
    		include ('default.php'); 
    	break; 
    } 
    ?>


    I get this error message:
    Fatal error: Call to undefined function: getscalars() in c:\apache\www\test\index.php on line 38

    What is causing it this time?
    Content Writing Service - Get custom SEO articles for 10$

  11. #36
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    getScalars() is not a PHP function.
    Try
    PHP Code:
    switch($_GET['page']) { 
    -Helge

  12. #37
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Helge
    getScalars() is not a PHP function.
    Try
    PHP Code:
    switch($_GET['page']) { 
    -Helge
    Thanks for that, but I can't get the page to execute the switch! Here is my code:
    Code:
    <?php 
    switch ($_GET['page']) {  
     case 'add': 
      include ('add.php'); 
     break; 
     case 'downloads': 
      include ('downloads.php'); 
     break; 
     default: 
      include ('default.php'); 
     break; 
    } 
    ?>
    And one of my links is:
    <a href="index.php?page=add">Add</a>

    When you click on it, all it does is add ?page=add into my url box! Yet it does not get add.php. What am I doing wrong?
    Content Writing Service - Get custom SEO articles for 10$

  13. #38
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the behavior in the url is correct.

    Remeber that this will not redirect you to a new page (and changing the url). It will simply include the page (add.php) into index.php.

    Do you have a file called add.php which echo out some text?

    -Helge

  14. #39
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Helge
    I think the behavior in the url is correct.

    Remeber that this will not redirect you to a new page (and changing the url). It will simply include the page (add.php) into index.php.

    Do you have a file called add.php which echo out some text?

    -Helge
    Wait, it has to echo out some text? I just have it with the html coding, just like default.php.
    Content Writing Service - Get custom SEO articles for 10$

  15. #40
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dragonfly_7456
    Wait, it has to echo out some text? I just have it with the html coding, just like default.php.
    Sorry I wasn't clear enough.

    You don't have to echo something with PHP. IT's ok to have just HTML aswell. Just make sure that somethin get printed to the screen. Like if you had accessed add.php directly you eoudn't get a blank page.
    Clearer?

    -Helge

  16. #41
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Helge
    Sorry I wasn't clear enough.

    You don't have to echo something with PHP. IT's ok to have just HTML aswell. Just make sure that somethin get printed to the screen. Like if you had accessed add.php directly you eoudn't get a blank page.
    Clearer?

    -Helge
    Not one bit. Thats what I've been doing. Maybe I should try a different peice of code for this. I don't know. You can see where I am testing at http://www.combats.dynu.com/test/

    It's in russian, and the link that goes to add.php is the top one (even though it should be linked to index.php)
    Content Writing Service - Get custom SEO articles for 10$

  17. #42
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great site - looks really good. Sorry about the getScalars() earlier on - should have made it clear that that's an example function that you'll need to create yourself, rather than a PHP function.

    For you current problem, easiest thing to do is post your current index.php script here.

  18. #43
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using some kind of a template system?

    I made two small pages just to test the switch and it works perfectly.

    -Helge

  19. #44
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by HarryF
    Great site - looks really good. Sorry about the getScalars() earlier on - should have made it clear that that's an example function that you'll need to create yourself, rather than a PHP function.

    For you current problem, easiest thing to do is post your current index.php script here.
    Thanks for the kind words. Ok, here goes.

    index.php (the one I left a link to)
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title> Combats.dynu.com - The template page</title>
    
    <link rel="stylesheet" href="/in/style.css" type="text/css">
    <link rel="shortcut icon" href="/favicon.ico">
    <META HTTP-EQUIV="Keywords" NAME="Keywords" CONTENT="бойцовский клуб, combats, combats.ru, БК">
    <META HTTP-EQUIV="Description" NAME="description" CONTENT="Помощь для новичков в Бойцовском Клубе Combats.ru">
    <meta content="text/html; charset=windows-1251" http-equiv=content-type>
    <meta name="robots" content="index,follow">
    <meta name="revisit-after" content="5 days">
    <meta http-equiv="imagetoolbar" content="no">
    <meta name="mssmarttagspreventparsing" content="true">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="content-style-type" content="text/css">
    </head>
    <body background="/images/background.gif" topmargin="0" leftmargin="0" bottomargin="0">
    
    <div align="center">
    <a name="top"></a>
    <table width="703" cellspacing="0" cellpadding="0">
    </tr>
    <td><img alt="" src="/images/header.gif" width="703" height="78"></td>
    <tr>
    <td><img alt="" src="/images/headerleft.gif" width="424" height="21"><a href="<A href='http://www.combats.dynu.com/">http://www.combats.dynu.com/"><img alt="Главная Страница" 
    src="/images/home.gif" border="0" width="57" height="21"></a><a href="<A href='http://www.combats.dynu.com/forums/">http://www.combats.dynu.com/forums/"><img alt="Наш Форум" 
    src="/images/forums.gif" border="0" width="49" height="21"></a><a href="/help"><img alt="Помощь для Сайта" src="/images/help.gif" border="0" width="56" height="21"></a><a href="/about"><img alt="О нашем сайте" 
    src="/images/about.gif" border="0" width="58" height="21"></a><a href="<A href='http://www.combats.ru">http://www.combats.ru"><img alt="Сайт Combats.ru" src="/images/combats.gif" 
    border="0" width="59" height="21"></a></td>
    </tr><tr>
    <td background="/images/mainback.gif" valign="top">
    
    <table width="100%" cellspacing="0" cellpadding="0" valign="top">
    <td width="158" valign="top">
    
    <img alt="" src="/images/navigation.gif" width="158" height="32">
    <table><td>
    <font face="verdana" style="font-size: 12px" color="black">
    <img alt="" src="/images/a.gif"> <a href="index.php?page=add">Главная страница</a><br>
    <img alt="" src="/images/a.gif"> <a href="/guestbook/">Гостевая книга</a><br>
    <img alt="" src="/images/a.gif"> <a href="/whyuse">Для чего этот сайт?</a><br>
    <img alt="" src="/images/a.gif"> <a href="/add">Добавить статью</a><br>
    <img alt="" src="/images/a.gif"> <a href="/history">История сайта</a><br>
    <img alt="" src="/images/a.gif"> <a href="/sections">О Разделах</a><br>
    <img alt="" src="/images/a.gif"> <a href="/help">Помощь</a><br>
    <img alt="" src="/images/a.gif"> <a href="/help">Прислать новости</a><br>
    <img alt="" src="/images/a.gif"> <a href="/staff">Список помощников</a><br>
    <img alt="" src="/images/a.gif"> <a href="/forums/">Форумы combats.ru</a><br>
    <br>
    </font>
    </td></table>
    
    <img alt="" src="/images/sections.gif" width="158" height="26">
    <table><td>
    <font face="verdana" style="font-size: 12px" color="black">
    <img alt="" src="/images/a.gif"> <a href="index.php?page=add">Как начинать?</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=explained">0 уровень</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=extratips">Переход с 0 на 1</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=featured">1 уровень</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=forfans">2 уровень и далее</a><br><br>
    <img alt="" src="/images/a.gif"> <a href="/random">Генератор ударов</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=generalinfo">О деньгах</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=gamesolutions">Оружие (0-2 уров.)</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=gameguides">С кем драться?</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=gameguides">Советы</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=gamesecrets">Статьи</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=gamesecrets">Стратегии</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=importanttimes">Таблица Опыта</a><br>
    <img alt="" src="/images/a.gif"> <a href="index.php?page=importanttimes">Что развивать?</a><br>
    <br>
    </font>
    </td></table>
    
    <img alt="" src="/images/departments.gif" width="158" height="28">
    <table><td>
    <font face="verdana" style="font-size: 12px" color="black">
    <img alt="" src="/images/a.gif"> <a href="<A href='http://idb.pinkpt.com">Новичков</a>http://idb.pinkpt.com">Новичков</a><br>
    <img alt="" src="/images/a.gif"> <a href="<A href='http://www.neodaq.com">Физические</a>http://www.neodaq.com">Физические</a><br>
    <img alt="" src="/images/a.gif"> <a href="<A href='http://www.neodaq.com">Договорные</a>http://www.neodaq.com">Договорные</a><br>
    <img alt="" src="/images/a.gif"> <a href="<A href='http://www.pinkpoogletoy.cjb.net/nquest">Групповые</a>http://www.pinkpoogletoy.cjb.net/nquest">Групповые</a><br>
    <img alt="" src="/images/a.gif"> <a href="<A href='http://www.pinkpoogletoy.cjb.net/workshop">Хаотичные</a>http://www.pinkpoogletoy.cjb.net/workshop">Хаотичные</a><br>
    <img alt="" src="/images/a.gif"> <a href="<A href='http://www.pinkpoogletoy.cjb.net/nquest">Без'>http://www.pinkpoogletoy.cjb.net/nquest">Без Правил</a><br><br>
    
    </font>
    </td></table>
    
    <img alt="" src="/images/qlinks.gif" width="158" height="29">
    <table><td>
    <font face="verdana" style="font-size: 12px" color="black">
    <img alt="" src="/images/neo_yellowkadoatie.gif" width="15" height="15">
    <a target="_blank" href="<A href='http://www.neopets.com/jelly/jelly.phtml">Советы</a>http://www.neopets.com/jelly/jelly.phtml">Советы</a><br>
    <img alt="" src="/images/neo_yellowkadoatie.gif" width="15" height="15">
    <a target="_blank" href="<A href='http://www.neopets.com/pirates/buriedtreasure/index.phtml">Статьи</a>http://www.neopets.com/pirates/buriedtreasure/index.phtml">Статьи</a><br>
    <img alt="" src="/images/neo_yellowkadoatie.gif" width="15" height="15">
    <a target="_blank" href="<A href='http://www.neopets.com/desert/fruitmachine.phtml">Таблицы</a>http://www.neopets.com/desert/fruitmachine.phtml">Таблицы</a><br>
    <img alt="" src="/images/neo_yellowkadoatie.gif" width="15" height="15">
    <a target="_blank" href="<A href='http://www.neopets.com/faerieland/springs.phtml">Торговля</a>http://www.neopets.com/faerieland/springs.phtml">Торговля</a><br>
    <img alt="" src="/images/neo_yellowkadoatie.gif" width="15" height="15">
    <a target="_blank" href="<A href='http://www.neopets.com/medieval/grumpyking.phtml">Энциклопедия'>http://www.neopets.com/medieval/grumpyking.phtml">Энциклопедия <p style="text-indent: 0; margin-left: 19; margin-top: 0">Оружия</a></p>
    <br>
    </font>
    </td></table>
     
    </td>
    <td valign="top">
    <table width="100%">
    <td valign="top">
     
    <font face="Tahoma" color="#000000" size="3"><b>The template page</b></font><br><br>
    <table><td>
     
    <?php 
    switch ($_GET['page']) { 
    case 'add': 
    include ('/test/add.php'); 
    break; 
    case 'downloads': 
    include ('downloads.php'); 
    break; 
    default: 
    include ('default.php'); 
    break; 
    } 
    ?>
     
    <br><br><br><br>
    </table>
     
    <center>
    <font face="verdana" style="font-size: 9pt">
    © 2002 - 2003
    <a href="<A href='http://www.combats.dynu.com">www.combats.dynu.comhttp://www.combats.dynu.com">www.combats.dynu.com</a> <br>
    [<a href="<A href='http://www.combats.dynu.com/">Главнаяhttp://www.combats.dynu.com/">Главная</a>] [<a href="<A href='mailto:dragonfly_7456@hotmail.com">Emailmailto:dragonfly_7456@hotmail.com">Email</a>] 
    [<a href="/help">Помощь</a>] [<a href="/linkus">Наш банер</a>]</font></center>
    <br>
    </td>
    </table>
    </table>
    </table><img alt="" src="/images/backtotop.gif" usemap="#btm_img" border=0 width="703" height="41"></tr>
    <map id="btm_img" name="btm_img"><area shape="rect" coords="154,8,244,28" alt="Back to Top" href="#top"></map>
    </table>
     
    </div>
    </body>
    </html>
    Dont mind the freaky letters please, they are just the russian text.
    Last edited by dragonfly_7456; Mar 27, 2003 at 08:01.
    Content Writing Service - Get custom SEO articles for 10$

  20. #45
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here is the default.php and the add.php pages.

    default.php:
    Code:
     
    <table width="360" cellspacing="0" cellpadding="0">
    <td><img alt="" src="/images/spottop.gif" width="360" height="49"></td>
    </tr>
    <tr>
    <td background="/images/pink.gif"><table><td>
     <p style="text-indent: 0; margin-left: 4; margin-top: 0"> <font face="verdana" style="font-size: 11px"> Приветствуем вас в combats.dynu.com! Здесь вы найдете огромное количество помощи и информации для Интернетовской игры combats.ru - Бойцовский Клуб.  У нас есть статьи, таблицы, объяснения, советы, стратегии и куча всякого другого. И все это всегда самое новое и самое лучшее! Так что ваши поиски кончаются здесь!   </font></p></td></table></td>
    </tr>
    <tr>
    <td><img alt="" src="/images/spotbot.gif" width="360" height="12"></td>
    </table>
    <p>
    <br>
    </p>
    <table><td><font face="verdana" style="font-size: 12px">[<a href="/">новости</a>] 
      [<a href="/old">старые новости</a>] </font><br>
      <br>
      
     
    
    <br>
    
    <br><br>
    <font face="tahoma" style="font-size: 12px"><b>Скоро будет:<br>
    </b>Мы скоро начнем работу<br> над страницами в разделе  "Для Новичков", а пока работаем над разделом "Навигация". 
    </font> <br><br><br><br><p align="center">
    <img src="/images/fist.gif" width="87" height="89" alt=""></p></td>
    </table>

    add.php:
    Code:
    <font face="Tahoma" color="#000000" size="3"><b> Добавить статью</b></font><br><br>
    <table><td>
      
    Для того, чтобы отправить нам статью или любую другую информацию, пожалуйста пользуйте эту страницу. Все очень просто. Введите свое имя, тему статьи и саму статью. Потом нажмите "Отправить". И все! Ваша статья будет проверена в течение 3 дней и потом будет поставлена на сайт!
    <br><br>
    <form action="http://pub35.bravenet.com/emailfwd/senddata.php" method="post" enctype="multipart/form-data">
    <input type="hidden" name="usernum" value="2994730206">
    <input type="hidden" name="cpv" value="1">
    <b>Ваше Имя: &nbsp;</b><br>
    <input type="text" name="username" size="32" maxlength="40"><br><br>
    <b>Ваш Email:&nbsp;</b><br>
    <input type="text" name="email" size="32" maxlength="40"><br><br>
    <b>Тема статьи:</b><br>
    <input type="text" name="subj" size="32" maxlength="40"><br><br>
    <b>Статья:</b><br>
    <textarea name="message" rows="10" cols="42"></textarea><br><br>
    <input type="submit" value="Отправить"></form>
    
    <br><br><br><br>
    </table>
    Content Writing Service - Get custom SEO articles for 10$

  21. #46
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try changing to this.
    PHP Code:
    include ('test/add.php'); 
    -Helge

  22. #47
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Helge
    Are you using some kind of a template system?

    I made two small pages just to test the switch and it works perfectly.

    -Helge
    A template system? What do you mean? I had some other files included with php, but I got rid of that. Let me check if thats what you ment.
    Content Writing Service - Get custom SEO articles for 10$

  23. #48
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On top of this page: http://www.combats.dynu.com/test/
    it says: "The template page"

    That's way I was asking. If you had a template system and you're trying this switch that might screw up the hole template system.

    -Helge

  24. #49
    SitePoint Wizard dragonfly_7456's Avatar
    Join Date
    Dec 2002
    Location
    Moscow, USSR
    Posts
    1,092
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Helge
    On top of this page: http://www.combats.dynu.com/test/
    it says: "The template page"

    That's way I was asking. If you had a template system and you're trying this switch that might screw up the hole template system.

    -Helge
    Hehehe. Here, I made a super simple test, and even that isn't working

    http://www.combats.dynu.com/text/one.php
    Content Writing Service - Get custom SEO articles for 10$

  25. #50
    SitePoint Wizard
    Join Date
    Oct 2001
    Posts
    2,686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you try to remove the slash as i suggested in post #46?

    -Helge


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •