Jump to content

why wont this echo?


seany123

Recommended Posts

As i said,

You didn't pass anything in the URL.. add ?ref=10 to it!

 

for that form to process you need to POST the form BUT the form is NOT passing the get

<form method="POST" action="register.php">

 

for example try

<form method="POST" action="register.php?ref=10">

 

ooh i see BUT the problem is i want to allow my players to use it as a Refferal link... so they can type ref= whatever they id is.

 

Okay, change it to a POST and add the input to the form (could be hidden)

ie

<INPUT type="hidden" value="<?php $_GET['ref']?>">

OR leave as GET

<form method="POST" action="register.php?ref=<?php $_GET['ref']?>">

(personally i'll use the hidden field)

 

other options are sessions, cookies

okay so what i have done is this added this just below the

<form method='POST' action='register.php'>

 

i added this:

 

<input type="hidden" value="<?php $_GET['ref']?>" name="refid">

 

then where the query is i added:

 

	if($_POST['ref'] >= 1)
	{
	$ref_id = $_POST['refid'];
	$insert['ref'] = $ref_id;
	}

 

now that should work right?

 

EDIT: it didnt work :(

Archived

This topic is now archived and is closed to further replies.

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