Newbie need help about PHP poll code

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

Code: Select all

$u = (!empty($_POSTї'username']));
$p = (!empty($_POSTї'password']));
on those lines?
that's probably becuase you can't do that.
if that would work, and if $_POST['password'] would be empty, $p would be set to nothing....

Code: Select all

<?php

$u = $_POST['username'];
$p = $_POST['password'];

?>[/php
User avatar
pido
Forum Commoner
Posts: 35
Joined: Mon Jan 12, 2004 8:03 am

Post by pido »

yea i can fill any user name and any password :lol: , sorry im so newbie... :oops: , but when i change it to

Code: Select all

$u = $_POST['username']; 
$p = $_POST['password'];
it give me an errors :? , it sayz

Undefined index: username
Undefined index: password


but i still can continue works evethough theres errors message in page

GOD PLZ HELP ME WITH THIS FU*** CODE !!!
Post Reply