EvilZone
Programming and Scripting => Web Oriented Coding => : ShinyMagikarp 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>
-
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?
-
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
-
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/ (http://sourceforge.net/projects/xampp/)
You can get WAMP from here:
http://www.wampserver.com/en/ (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 (http://pogostick.net/~pnh/ntpasswd), or try to reason with your mother.
-
@fur thanks for the links :D I'm totally bout to dive into PHP and JavaScript. But first.. bout 8 hours of sleeps lol
-
Codeacademy teaches PHP now if you want an interactive way to learn PHP. It also teaches Javascript too
-
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 ;)