Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

im back! ....with another prob :(

Links for php scripts

Moderators: macek, egami, gesf

im back! ....with another prob :(

Postby TrickyRic » Fri Aug 01, 2003 9:47 am

hi, easy one this time :) (i hope) basically, ive changed the structure of my site to always use 1 page but load other pages into the center cell (the include command basically) but now my forms dont work :S

it worked before and the only actual difference is the action of the form, instead of it pointing to..

exasperationpa.php

...its now...

index.php?page=exasperation

...and the code on index.php is..

<?php
$check = isset($page);
if ($check == 1)
{
if (@fopen("$page.php", "r"))
{
include ("$page.php");
}
if (!(@fopen("$page.php", "r")))
{
include("404.php");
}
}
if ($check <> 1)
{
include("home.php");
}
?>

...loads the page fine, but i get a php...

Notice: Undefined index: attempt in C:\PROGRAM FILES\ABYSS WEB SERVER\htdocs\freefornow\exasperationpa.php on line 3

...line 3 of exasperationpa being...

$typed = $_POST['attempt'];

...so obviously it cant read the value entered in the form anymore, is this a problem with using includes? and is they a fix?

thanks, if its anything to do with my settings, heres an info page...

http://freefornow.dyndns.org/freefornow/info.php
User avatar
TrickyRic
New php-forum User
New php-forum User
 
Posts: 50
Joined: Mon Mar 03, 2003 6:28 am
Location: Toronto, Canada

fixed!

Postby TrickyRic » Fri Aug 01, 2003 1:54 pm

ah tis ok, a dam good guy with a dam good eye spotted the forms input box was named 'attempt2' instead of 'attempt' :roll:

note to self: dont copy and paste in dreamweaver :)

anyway, all fixed and working again :D
User avatar
TrickyRic
New php-forum User
New php-forum User
 
Posts: 50
Joined: Mon Mar 03, 2003 6:28 am
Location: Toronto, Canada


Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron