Jump to content

Detect Hardware By Hw Id


badeand

Recommended Posts

Hi,

 

I´m making a system that´s is meant to store information about some hardware and the different kind of error messages and fault that appears on the hardware.

 

Each hardware has is it`s own unique hardware ID and it`s the last 4 digits in the Hardware ID ( serial number). Is there a way that i can detect wich hardware this is by making the php script looking for the 4 last digits in the serial and lookup this in a mysql table (that contains the different equipment and information about this) and pick the right equipment and then redirect to the right error handling page with the specified form for this equipment?

 

Each equipment has it own error messages and known errors, so one error (form) for each equipment is needed.

Edited by badeand
Link to comment
Share on other sites

Do you want to make it automatically detect the serial number? Or is it a form that the person fills out? If it's the former, you'll need to involve some javascript. If it's the latter, you can grab the last four digits of the submitted serial number and then do a query. Try looking at substr. You can tell it to start at the strlen($serial) - 4 and then use that to query your database.

Link to comment
Share on other sites

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.