0

I'm a beginner programmer and i have been trying to solve this problem for 3 days now. I've been trying google and w3 but so far no luck and wanted to my luck here.

I need to get the the ID from a url (www.example.com/index.php?id=name). I've been studying how to do the html method but no luck there as well. The code that my boss gave me is messy and i can't read all of them. I'm sorry for asking you this ind of question and forgive my lack of knowledge. I also need to send it to a database.

The code in progress.

if(attemp>3){


alert("Account has been locked. Maximum (3) attempts reached!");

window.location.href="index.php?id="+u+"&#toregister";
Junnel
  • 107
  • 1
  • 16
  • See this answer http://stackoverflow.com/a/901144/1409399 – iLaYa ツ Aug 12 '16 at 07:02
  • if you are using PHP then you can use the global (`$_POST`, `$_GET`, `$_REQUEST`) variables to get the ID parameter – Martin Aug 12 '16 at 07:12
  • share your code here – Aman Maurya Aug 12 '16 at 07:12
  • @Martin. I'm using javascript but is it easy when i do that in php? – Junnel Aug 12 '16 at 07:21
  • My problem is kinda like this Once a user fail 3 times a php?id=name appear. This happens in javascript and i've been thinking of switching to php but people says her that it is impossible. I'm pulling my hair out because i don't know what to do anymore. – Junnel Aug 12 '16 at 07:42
  • in PHP on the page where you are trying to access the URL parameter it is as easy as using `$param = $_POST["id"];` – Martin Aug 12 '16 at 07:49

0 Answers0