Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Beauford2016

  1. Thanks for the reply kicken I'll play around with that and see how it works out.
  2. I thought the question was well laid out myself. The reason I asked it this way is it is every piece of code I write where a variable is concerned I have to fight with this error. I can post every script I have written if you want to sift through them all, but I am asking in general how do I write ANY code so as not to get these errors. I thought defining $variable = "" like this at the beginning of my page would solve this, but in many cases not. If somewhere down the code I use $variable = "Whatever", boom, undefined variable $variable - or in other cases undefined index depending
  3. I don't know who did this or why this was implemented, but it was the worst decision PHP made as it causes nothing but problems. Not having to define variables was one of the reasons I liked PHP. This is just my opinion so no roasts. Question is, what is the proper way to do this so I don't get this message 'cause I am hit and miss, even when I think I have them defined this stupid message pops up. This is the 3rd line on the on script that is causing me grief at the moment: $submit = $populate = $record = $row[] = $hid = $uid = $asset_tag = $type = $manufacturer = $model = $serial_
  4. Thanks Barands, that works perfectly. I knew I was in the right area but just couldn't get it exactly. Thanks also mac_guyver for your response.
  5. I have two tables, an assets and a users table. In both tables there is a UID row. If an asset is assigned to a particular user the UID's in both tables will be the same, if not the UID in the assets table will be 0. So what I am trying to do is select the two tables based on the particular asset and whether or not a user is assigned to it. If there is no user I just display the assets information if there is a user I want to display that as well. I have tried various different combinations of joins without any luck, below is just one of the failures. $q = "SELECT * FROM assets t1 jo
  6. Got it, finally............. $vu = "<a href=viewuser.php?u=".$r['userid']." "; $cs = $csscode[$r['userlevel']-1].">".$r['username']."</a> "; $ui = "[".$r['userid']."] was added to your hitlist"; gangevent_add_2($gangdata['gangID'], $vu." ".$cs." ".$ui); Left the single quotes around '$text'. The above might of worked on one line, but never tried it. Thanks
  7. I changed this so that id='member' generates id="member" and tried with leaving the single quotes around $text and also with removing them. Same issue. $csscode = array('id="member"','id="admin"','id="gm"','id="fm"','id="et"','id="mm"','id="ow"','id="ow"'); Also tried this - no quotes on member: $csscode = array('id=member','id="admin"','id="gm"','id="fm"','id="et"','id="mm"','id="ow"','id="ow"'); } Thanks
  8. I have an old site written for PHP 5.4 and under and trying (very trying) to get it to work with PHP 7x without much luck. Due to all the changes in 7 my code is one big error message, but one thing at a time. I cannot get the follow code to work at all, even though it worked in PHP 5. Error: QUERY ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'viewuser.php?u=666' id='member'>THE PREDATOR [666] was added to the hit' at line 1 The Query was INSERT INTO gangevents VALUES('','20', UNIX_TI
  9. Can someone please, please, please tell me wtf is going here before I go totally postal and shoot up my ISP. If I insert this code at the top of any of my web pages it halts the page and nothing below it gets processed. I just get a blank page. Even if I try to make an error on purpose, nothing, just a blank page. All this works perfectly on PHP 5.4 and under. Currently using 5.6 which I downgraded from 7.2 thinking maybe that was an issue. Running on Linux Mint 19. I thought this might be a good hobby since I had a spare laptop just lying around, but maybe I was mistaken - too much time al
  • 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.