Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Posts posted by GingerRobot

  1. So continuing with the trend of an update from my original post:

     

    Hello, im ben, and im an alcoholic.

     

    Oh wait, im not at my AA meeting am i? :P

     

    Anyways, continuing after my rather poor joke, i'm 17, male and live in the UK. I got started with php about 2 years ago after seeing my dad struggle to use a pre build emailer for a website he was making. After finding out about that, i set about making a text based game, which worked well although i didn't have the time to make anything of it.

     

    Currently, most of the php work i do is actually trying to sort out problems on these forums - i swear most of the php i've learnt has come from seeing questions posted and their answers. Im in the first year of 6th form and plan on going to uni after my a-levels to do a computer science degree(hopefully at oxford).

     

    For some unknown reason, i quite like running - i run up to 10k(6.2 miles for you imperial folk). I also very much like my music - mostly indie/alternative although i do like a bit of everything really.

     

    I guess quite a lot of that's changed. For starters, i've not done much running at all this year. Mostly because i've had problems with my knees but also because i've been being pretty lazy.

     

    I'm now actually at University, studying Computer Science. Not at Oxford, but Bristol. I guess maybe it's a shame I didn't make it into Oxford, but hey, I really like it here. Plus, I've a feeling the course at Oxford was a bit too theoretical for my liking. I'm in my second year now and really liking it. In terms of languages, we tend to focus on C and Java. Though, as i understand it, my next lecture will be to introduce us to some horrible, esoteric language called Occam. It's supposed to help with parallel computation I believe. Fortunately I think we only use it once!

     

    To be honest, I spend much less time with PHP then i used to. I still try and drop in here as and when. It's usually when I really should be working :s In fact, right now I'm supposed to be writing up some coursework for my algorithms unit. Whoops.

     

    Outside of my uni work, I spend quite a lot of time with my girlfriend. We've been together for just under a year now and things are going great. Plus of course the general university cycle of: drinking, lecture, hangover, sleep. Unfortunately not always in that order though.

  2. Unfortunately, the recession hit somewhat hard here, and I face an uphill battle with employment anyway because of my disability (who's more likely to get hired: the guy who relies on other people for transportation, or the guy who can drop everything and work overtime if necessary?).  Still, I'm working at it.

     

    Sounds pretty nasty. How are discrimination laws over in The States? Here in the UK, it seems things have swung the other way a little; it seems to be quite common now for job averts to promise to interview any and all people with a disability for fear of appearing discriminatory. Now, im not being funny, but would they really interview you if you applied to be a brain surgeon, just because you had a disability?

  3. All the while the teachers and ANYONE that could login using a password was able to view all this stuff.  This is when I made a my first real program that did anything remotely productive.  In this day and age that program would be called phishing.  Basically I sent out a mass e-mail to all the teachers on Presidents Day (with the From header forged for the principal's email) with a link to a greeting card .. somewhere.  It then immediately redirected to my script on my server (I know.. pretty insecure and retarded. but so were they) that resembled an incorrect login page that EVERYONE in the school was so used to.  As you can imagine I programmed it to e-mail me their input and within a day I had at least 30 user/passes for my own personal unrestricted internet access at schoo

     

    Brilliant, lol.

     

    Did you get caught for that one?

  4. What do you mean by 'combine'? Do you with your player array to contain two cars afterwards? If so, you need to make your player array a two dimensional one. I.e:

     

    $playerSelected = array();
    $playerSelected[] = array( 
            'manufacturer' => 'Toyota', 
            'model' => 'Celica', 
            'modexp' => '1200000',
            'traction' => '500000',
            'aerodynamics' => '3000000',
            'acceleration' => '1500000',
            'styling' => '6000000' 
    );
    

     

     

    You can then add a new car in the same vain as above;

     

    $playerSelected[] = $carList[$key];
    

     

  5. What is it that you are actually hoping to achieve? Writing object-oriented programs is more than just moving your procedural code inside a class. If you do that, all you are achieving is a higher level of "wrapping" of your code (by that, i mean your code is inside a function which is inside a class). The point of the object-oriented paradigm is to allow you to more easily build extensible self-reliant code. A class should (at least in theory) be an entity in it's own right; it should make sense and have a purpose. It should represent something. It shouldn't (as much as is possible) be dependant on another class or another piece of code.

     

    In terms of writing classes for database interaction, one of the key points of this is usually to abstract away the particular RDBMS. For example, it shouldn't (in theory) matter if you are using a MySQL database, or PostgreSQL or whatever; the usage of your class should be the same. It should (again, in theory) facilitate the movement of RDBMS in the future. Ideally, it should handle errors and exceptions in your database, and should (probably) deal with cleaning your data before input.

     

    The whole point of this spiel? There's no point writing a function that simply calls mysql_**** and putting it in a class.

  6. @Mchl

    I tried to replaced 'this' with 'regName'.

     

    That will still not work for the reasons outlined by Andy-H.

     

    @Andy-H

    I tried your code. There were no error but still the values were not inserted.

     

    Did you connect to the database first? In any case, add some debugging to your query:

     

    mysql_query("INSERT INTO `table1` (id, fname) VALUES (1, '" . $regName . "')") or trigger_error(mysql_error(),E_USER_ERROR);
    

  7. REBUMP, I know this is probably against the rules but I really need help. I've waited for a month on different forums and am loosing my patients.

     

    If you can't be bothered helping at least tell me what it is so I can google it.

     

    Well that is because you appear to be asking for someone to do this for you. If that is what you want, i suggest you pay someone. If you want to do this yourself, i suggest you start learning a little PHP. Read some tutorials. Find out how to interact with a database from PHP. Find out how to process a form with PHP. You could try the tutorial section on this website: www.phpfreaks.com/tutorials

  8. How are you planning on storing the data? You could either put the title and content into a database, or you could use a template and write the content to a file. Whichever method you choose, you'll need some basic form handling to do this -- do you have any experience of PHP already?

  9. ...and i dont waste any more time than is necessary, but im productive and have contributed lol

     

    You do, unfortunately, waste everyone else's time owing to them having to spend twice as long deciphering your posts and, ultimately, ignoring what you've written because they can't read it anyway.

     

    So if we consider the overall time spend on your posts, it would be much lower if you used a spell checker.

  10. I tried to add those lines at the beginning of file to /etc/bash.bashrc but gedit didn't allow me to make any changes to this file. Save wasn't available, only Save As:

    # Added by me to enable Apache Ant

    EXPORT PATH=$PATH:/home/mainacc/tutorial/apache-ant-1.7.1/bin

    EXPORT ANT_HOME=/home/mainacc/tutorial/apache-ant-1.7.1

     

    If you want to add to the system-wide bashrc file (i.e. the one in /etc/) you'll need root access so you'll have to use sudo:

     

    sudo gedit /etc/bash.bashrc
    

     

    But I dont think you should need to make changes to this -- just use the one located in your home directory. This will mean the changes that you make will only apply to that user:

     

    gedit ~/.basrhc
    

     

    As for your java problem -- do you have any network access? You're obviously not going to be able to download a package if you're wireless isn't working and you don't have a wired network...

  11. Long story short, i'm pretty sure the only way to restrict access to a folder to a bunch of users would be to add them to a group and set the group of the folder, which requires root access. Is this correct?

     

    Full explanation, i'm just starting a group project at university and it was my intention to set up a Subversion repository on my university's server. Given that there is another group doing a similar project, I'd like to make sure that they couldn't get desperate and copy the entire repository over and view/steal our files. However, i don't have root access(obviously!) so I cannot create a group for the members of our team. Do I have any options?

  12. Brilliant, reminds me of a story (on digg maybe) where some guys hacked a road-side sign to say something like "ZOMBIES AHEAD".

     

    Haha. Yeah, i remember there was something like that on a welcome sign in the UK..."Welcome to wheverer. Now f*** off"

×
×
  • 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.