Click here to Skip to main content
15,504,703 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 10:33
fly90423-Jan-10 10:33 
NewsRe: PHP Member Pages... Need major help... [modified] Pin
thebiostyle23-Jan-10 10:51
thebiostyle23-Jan-10 10:51 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 11:38
fly90423-Jan-10 11:38 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 11:47
thebiostyle23-Jan-10 11:47 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 12:00
fly90423-Jan-10 12:00 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 12:18
thebiostyle23-Jan-10 12:18 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 12:29
fly90423-Jan-10 12:29 
GeneralRe: PHP Member Pages... Need major help... Pin
fly90423-Jan-10 12:23
fly90423-Jan-10 12:23 
Before you continue, I suggest you tidy up your code and get into some good practices.

thebiostyle wrote:
include_once"CONFIGPAGE.php";

Encapsulate the target file in brackets: include_once('CONFIGPAGE.php');. And use single quotes, as it is quicker.

thebiostyle wrote:
$fetch_users_data = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE username='".$_REQUEST['username']."'"));
$fetch_users_id = mysql_fetch_object(mysql_query("SELECT * FROM `members` WHERE id='".$_GET['user']."'"));

You need to check first whether or not 'user' and 'username' are set. If they aren't then it will throw errors.
$username = isset( $_REQUEST['username'] ) ? $_REQUEST['username'] : '';
$user = isset( $_GET['user'] ) ? $_GET['user'] : '';
You seriously need to sanitise your data inputs to protect from SQL injection attacks. Use the mysql_real_escape_string[^] function.
$username = mysql_real_escape_string( $username );
$user = mysql_real_escape_string( $user );
Then use those sanitized values as your SQL inputs.

thebiostyle wrote:
echo "".$fetch_users_data->username."";

There is no need for the "" around the value. It will work just fine without it: echo $fetch_users_data->username;

thebiostyle wrote:
<body bgcolor="#000000" onload="$_GET['user']">

There is no need to have an onload attribute, with $_GET['user']. It is also bad practice to use bgcolor. Use the style attribute instead, or better still use CSS classes.

thebiostyle wrote:
</div>
</table>

From what I can see you haven't opened a div; therefore there is no need to close one.

Note that you should also have a DOCTYPE which you should work from. http://www.w3schools.com/tags/tag_DOCTYPE.asp[^]

If at first you don't succeed, you're not Chuck Norris.

GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle23-Jan-10 12:48
thebiostyle23-Jan-10 12:48 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle24-Jan-10 8:07
thebiostyle24-Jan-10 8:07 
AnswerRe: PHP Member Pages... Need major help... Pin
Graham Breach24-Jan-10 8:57
Graham Breach24-Jan-10 8:57 
GeneralRe: PHP Member Pages... Need major help... Pin
thebiostyle24-Jan-10 9:34
thebiostyle24-Jan-10 9:34 
QuestionAdd two difference items to shopping card-Paypal Pin
tktuan28-Dec-09 17:08
tktuan28-Dec-09 17:08 
AnswerRe: Add two difference items to shopping card-Paypal Pin
cjoki29-Dec-09 5:40
cjoki29-Dec-09 5:40 
GeneralRe: Add two difference items to shopping card-Paypal Pin
tktuan29-Dec-09 16:05
tktuan29-Dec-09 16:05 
GeneralRe: Add two difference items to shopping card-Paypal Pin
cjoki30-Dec-09 5:42
cjoki30-Dec-09 5:42 
GeneralRe: Add two difference items to shopping card-Paypal [modified] Pin
tktuan30-Dec-09 16:20
tktuan30-Dec-09 16:20 
AnswerRe: Add two difference items to shopping card-Paypal Pin
vorotnik27-Jan-10 7:58
vorotnik27-Jan-10 7:58 
QuestionPython in Corpus Analysis Pin
ahmedshamim24-Dec-09 15:29
ahmedshamim24-Dec-09 15:29 
QuestionRadio Buttons Pin
thebiostyle24-Dec-09 9:56
thebiostyle24-Dec-09 9:56 
AnswerRe: Radio Buttons Pin
abushahin28-Dec-09 8:47
abushahin28-Dec-09 8:47 
GeneralRe: Radio Buttons Pin
thebiostyle28-Dec-09 11:34
thebiostyle28-Dec-09 11:34 
GeneralRe: Radio Buttons Pin
cjoki29-Dec-09 5:32
cjoki29-Dec-09 5:32 
GeneralRe: Radio Buttons Pin
abushahin31-Dec-09 8:45
abushahin31-Dec-09 8:45 
AnswerRe: Radio Buttons (long answer) Pin
enhzflep29-Dec-09 15:14
enhzflep29-Dec-09 15:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.