Author Topic: Well, dammit.  (Read 1443 times)

0 Members and 1 Guest are viewing this topic.

Offline ShinyMagikarp

  • Serf
  • *
  • Posts: 22
  • Cookies: -2
  • *yawn* I'm a snorlax.
    • View Profile
Well, dammit.
« on: April 27, 2013, 02:39:44 am »
Ok,


I know this is a total n00b question, but how the hell do I embed PHP into an HTML page? I don't have any software that interprets PHP code because my mom (I'm 17 lol) put a stupid fucking password on my desktop comp so I can't download any programs, but my laptop is from the freaking Stone Age!


Here's the source code.


<html>
<head>
<title>Testing PHP 123<title>
</head>
<body>
<?
document.write('Hello World!');
?>
</body>
</html>
RAWR ima eat u

Offline Zesh

  • Royal Highness
  • ****
  • Posts: 699
  • Cookies: 42
    • View Profile
Re: Well, dammit.
« Reply #1 on: April 27, 2013, 04:04:01 am »
If you want to be a hacker, I think you should start by getting rid of that password your Mom set. +1 for being a Snorlax :)

Isn't "document.write" JavaScript?

Offline ShinyMagikarp

  • Serf
  • *
  • Posts: 22
  • Cookies: -2
  • *yawn* I'm a snorlax.
    • View Profile
Re: Well, dammit.
« Reply #2 on: April 27, 2013, 04:07:06 am »
If you want to be a hacker, I think you should start by getting rid of that password your Mom set. +1 for being a Snorlax :)

Isn't "document.write" JavaScript?


Holy shit dude ur right!!! God I'm such a retard yeah it should be echo ("Hello World") I think. I'm still on like the first lesson lol soososososososo ok I have windows 7. So to get rid of the pass word I just gotta open Cmd and type "net user administrator *" and then type the new pass. Kewl. Totally forgot about that haha
RAWR ima eat u

Offline Fur

  • Knight
  • **
  • Posts: 216
  • Cookies: 34
    • View Profile
Re: Well, dammit.
« Reply #3 on: April 27, 2013, 04:07:16 am »

You're using PHP tags for Javascript. Also, you'll need a XAMMP/WAMP to execute PHP code, so get rid of the software your overprotective mum installed.

So to get rid of the pass word I just gotta open Cmd and type "net user administrator *" and then type the new pass. Kewl. Totally forgot about that haha
I believe one has to be an admin to promote a user to admin, so the command is useless.



echo ("Hello World")
Echo is a language construct, so you don't need the parenthesis. You also forgot the semicolon.

Using "<?" to start your PHP code is bad practice as it's not officially supported by the PHP devs and could be removed in any future release. Use "<?PHP" instead.

You can get XAMMP from here:
http://sourceforge.net/projects/xampp/
You can get WAMP from here:
http://www.wampserver.com/en/




Regarding your mother:
You could do a fresh Windows install, partition your HDD and install a Linux distro, use the Offline NT Password & Registry Editor, or try to reason with your mother.
« Last Edit: April 27, 2013, 04:30:16 am by Fur »

Offline ShinyMagikarp

  • Serf
  • *
  • Posts: 22
  • Cookies: -2
  • *yawn* I'm a snorlax.
    • View Profile
Re: Well, dammit.
« Reply #4 on: April 27, 2013, 04:13:03 am »
@fur thanks for the links :D I'm totally bout to dive into PHP and JavaScript. But first.. bout 8 hours of sleeps lol
RAWR ima eat u

Offline lucid

  • #Underground
  • Titan
  • **
  • Posts: 2683
  • Cookies: 243
  • psychonaut
    • View Profile
Re: Well, dammit.
« Reply #5 on: April 28, 2013, 01:00:23 am »
Codeacademy teaches PHP now if you want an interactive way to learn PHP. It also teaches Javascript too
"Hacking is at least as much about ideas as about computers and technology. We use our skills to open doors that should never have been shut. We open these doors not only for our own benefit but for the benefit of others, too." - Brian the Hacker

Quote
15:04  @Phage : I'm bored of Python

Offline NovaCygni

  • Peasant
  • *
  • Posts: 86
  • Cookies: 2
  • 403:Forbidden
    • View Profile
Re: Well, dammit.
« Reply #6 on: April 28, 2013, 02:57:38 am »
I believe one has to be an admin to promote a user to admin, so the command is useless.


Nope you can run the command as System just queue it to run in like 5 seconds after you type it, I forget of the top of my head what it is but yeh, just run the command as System which is technically higher than the normal Admin account. Also check to see if the safe mode has a password on it aswell, if not just create yourself a new Admin level user account ;)
We do what we want, Because we can.