Jump to content

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 :(

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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