Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7923577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:22:09+00:00 2026-06-03T17:22:09+00:00

Im going to get started. Im setting up an hwid login for my vb.net

  • 0

Im going to get started.

Im setting up an hwid login for my vb.net program,

To be safe, im not directly connecting to my db from the program, because if it was cracked, my db info is leaked,

so i want it running through php,

this is my current php code

<?php
$con = mysql_connect("localhost","username","password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
 }

 mysql_select_db("db", $con);
$hwid
 $result = mysql_query("SELECT Name FROM hwid WHERE HWID =".$hwid. "'");

 while($row = mysql_fetch_array($result))
 {
  echo $row['Name'] . " " . $row['HWID'];
   echo "<br />";
   }

    mysql_close($con);
   ?>
`

of course, i have removed my db info, but im getting this error
Parse error: syntax error, unexpected T_VARIABLE in db.php on line 10

I cant seem to find what the problem is,

what i want to do is have the program submit the hwid like this site.com/db.php?hwid=hwid here and have it echo the name in the row of the hwid submitted.

Im kinda stumped :/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T17:22:13+00:00Added an answer on June 3, 2026 at 5:22 pm

    Parse error: syntax error, unexpected T_VARIABLE in db.php on line 10

    Let’s take a look at the code:

    1  <?php
    2  $con = mysql_connect("localhost","username","password");
    3  if (!$con)
    4  {
    5  die('Could not connect: ' . mysql_error());
    6   }
    7  
    8   mysql_select_db("db", $con);
    9  $hwid
    10   $result = mysql_query("SELECT Name FROM hwid WHERE HWID =".$hwid. "'");
    

    The 9th line is $hwid, which serves no purpose. It a minimum, I would imagine it should be $hwid;. Without the semicolon the parses will continue onto the next token (on line 10) and try to understand that. It can’t, hence an error.

    EDIT Taking the code from your comment

    9   $hwid = $_GET['hwid'];
    10  $result = mysql_query("SELECT * FROM hwid WHERE HWID ="'.$hwid'");
    

    The 10th line is incorrect, you’re mixing up ", ' and .

    Try either:

    $result = mysql_query("SELECT * FROM hwid WHERE HWID ='".$hwid."'");
    

    or

    $result = mysql_query("SELECT * FROM hwid WHERE HWID ='$hwid'");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really need to get started with source control because I'm going absolutely crazy
I realize I'm going to get flamed for not simply writing a test myself...
Is it okay to get a read-only collection from an aggregate without going through
From the should be simple, but... files: Trying to get started with jQuery UI.
First I've read loads of posts and sites that recommend going to http://silverlight.net/GetStarted/ to
Trying to setup and get going with the RestKit library for a cocoa project
I'm going insane trying to get an AVCaptureSession (in a view controller) to be
I'm trying to get background music going for my XNA game, but the options
I'm going round in circles at the moment trying to get the pattern right
I am trying to get logging via the application.ini file going and I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.