Portal Home > Knowledgebase > Articles Database > PHP Help (again lol)


PHP Help (again lol)




Posted by Danny159, 08-25-2007, 03:59 PM
Hey I have this script i have just made and i want it to put all the items in the database into a table so i can view then as the admin. However i can't seem to get it to put the data into the table... Here is the script is there any way someone can help me it brings up the titles to the table but not the data in the table

Posted by Steve_Arm, 08-25-2007, 04:30 PM
Why don't you gather all your errors and put them in a thread, after one hour ? Because you are selecting only one item that doesn't exist in the table? ($_GET['id'])

Posted by Danny159, 08-25-2007, 04:38 PM
ok so i have an id in my database but thats a auto_increment so if i make another id called id2 then that will then work? (sorry im still lerning php a mate was teaching me php lol and im still abit slow on errors)

Posted by Jamie Edwards, 08-25-2007, 04:41 PM
Where is $id being set? What does it contain?

Posted by Danny159, 08-25-2007, 04:46 PM
I have now changed this to: but it is an auto_increment so i just counts up as new data is added...

Posted by Danny159, 08-25-2007, 05:05 PM
All i rearly want is to be able to view the data in my database in a table on a webpage Here is a list of what is is my 'voucher' table id - auto_increment id number id2 - hand imput id name - name of voucher code - voucher code amount - amount you get off is that php script right for what i want it to do?

Posted by Steve_Arm, 08-25-2007, 05:09 PM
Basically if you want to retrieve ALL the data from the table, you don't set a select criteria. It should be "SELECT * FROM voucher ORDER BY name ASC" And:

Posted by Steve_Arm, 08-25-2007, 05:15 PM
And to avoid getting hacked again.

Posted by Danny159, 08-26-2007, 04:39 AM
Yes thanks its working fine now and i have added your anti hack top man thanls guys



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
CC processing (Views: 736)
Security Rating ? (Views: 668)
Docker (Views: 757)


Language: