Mobile app version of vmapp.org
Login or Join
Angie530

: [PHP]Parse Error I am using this code: <?php $pid=$_GET["pid"]; $pname=$_GET["pname"]; $pnamecheck=array("test") if ($pname == $pnamecheck[$pid]) { echo "You are using a Licenced Version of Program."

@Angie530

Posted in: #Php

I am using this code:

<?php
$pid=$_GET["pid"];
$pname=$_GET["pname"];

$pnamecheck=array("test")

if ($pname == $pnamecheck[$pid]) {
echo "You are using a Licenced Version of Program."
}
else
{
echo "You are using a Crack Version of Program!"
}

?>


And Getting this error:

Parse error: syntax error, unexpected 'if' (T_IF) in ... on line 7

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Angie530

1 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

You're missing semicolons (;) at the end of your statements. See below fixed version:

$pnamecheck=array("test");

if ($pname == $pnamecheck[$pid]) {
echo "You are using a Licenced Version of Program.";
}
else
{
echo "You are using a Crack Version of Program!";
}

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme