Jump to content

jimbo_3000

Members
  • Posts

    17
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jimbo_3000's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks Mchl; You finally got my point. That's all I needed to know.
  2. OK this is the last try. here is some code <?PHP echo 'Thanks for reading.'; ?> In Dreamweaver my testing server is set up so all I have to do is to choose what browser i want to view the output, firefox or IE. "Thanks for reading." shows up in my browser. Now the same code in the same location with notepad++ i get an error. This is what i did; I choose "RUN" from the tool bar. Then I choose firefox and then I get an error message. It never gets to my browser. So now the problem is notpad++ is not set correctly. Well that is only thing I can think of. So I am thinking the problem is that I have not set up notepad++ correctly. I may not have used the right jargon for all this mess. But; this has nothing to do with what a text editor is, what a server does and what php can do. How do you type some php in notepad++, then go to "RUN" in tool bar and then choose your browser and display "Thanks for reading." in the browser?
  3. I just want to use notepade++ to edit php than check the it on the browser. But It won't work. I have XAMPP for all the server stuff. I just need how to srt up notepad++ to funtion right when I have some php. Please with all do respect I don't need an explanation what the server does or what the browser does. I understand that I just have not used the right terms. My php code runs fine under dreamweaver, I am trying to use notepad++ and see how it works. I need an explanation how to setup notepad++. I want to have php code in notepad++ and execute it. My sever is ok because the same code executes when i use a different program.
  4. So does anyone here use notepad++ if so how do you set up to where the browser reads php. assuming you have xampp working fine.
  5. The problem is I can't connect notepad++ to the server. When I use dreamweaver or phpdesigner the code works.
  6. Very cute; but wrong answer. So if there is code in php and I want to run my code in my browser and server how do I get that to work. Just never mind the technical terms. How do you check your php once its on notepad++?
  7. I am trying to run php in notepad++. However when I run any php code, notepad++ ask if i want to save or open the file. When I choose open nothing happens. So how do I make php run while using notepad++.
  8. I have xampp working with Dreamweaver and another text editor. So the problem is not xampp. I am trying out Notepad++ and my php is not working under Notepad++. The main problem is that I don't know how to configure Notepad++ to work with xampp. The same code that works in Dreamweaver won't work with Notepad++. How do I get Notepad++ to work with the sever?
  9. I have notepad++ and xampp but i can't get the php to display. Where do I configure my the server. This is my xampp directory C:\xampp\htdocs Thanks in advance. Jimbo
  10. I'm not sure what you mean by the above can direct to an example?
  11. i am working with this code and i am trying to separate one section so i can just call it over and over but it is not working. I tried putting the page by itself but it won't work when i call it. What is the proper way of calling this function? <?php require_once('requires.php'); require_once('PhotoShareBase.php'); class CreateAccountPage extends PhotoShareBase { public function __construct() { parent::__construct(); } public function title() { return 'Create Account'; } public function inlineStyle() { $style = <<<EOSTYLE label { margin-top: 0.5em; display: block; font-family: Arial, Helvetica; font-size: 10pt; color: #444; } EOSTYLE; return parent::inlineStyle() . $style; } protected function generateBodyContents() { parent::generateBodyContents(); if (User::amILoggedIn()) { echo 'Sorry, you can\'t be logged in when viewing this page'; return; } echo <<<EOCONTENTS <h3>Create a New User Account</h3> <form method='post' action='SubmitAccountData.php' name='create_user_form'> <div> <label>User Name:</label> <input type='text' name='user_name' size='30'> </div> <div> <label>Full Name:</label> <input type='text' name='full_name' size='30'> </div> <div> <label>Password:</label> <input type='password' name='password1' size='20'> </div> <div> <label>Password (confirm):</label> <input type='password' name='password2' size='20'> </div> <div> <label>Email Address:</label> <input type='text' name='email_address' size='30'> </div> <div> <label>User Bio:</label> <textarea name='user_bio' rows='10' cols='40'></textarea> </div> <p><input type='submit' value='Create User'></p> </form> EOCONTENTS; } } $page = new CreateAccountPage(); $page->processRequest(); ?> this is the code that is repeating i want to call it separately i tried a few things and it did no work. It is mainly css but I still wanna be able to call it. public function inlineStyle() { $style = <<<EOSTYLE label { margin-top: 0.5em; display: block; font-family: Arial, Helvetica; font-size: 10pt; color: #444; } EOSTYLE; return parent::inlineStyle() . $style; }
  12. you were right the css was just referring to a wrong css file.
  13. here is the other code i am not sure if this is right? <?php require_once('Request.php'); abstract class VisualPageBase extends RequestHandler { public function __construct() { } public abstract function title(); protected abstract function generateBodyContents(); public function inlineStyle() { return ''; } public function processRequest() { // make sure we process any incoming POST data as appropriate parent::processRequest(); /** * Now emit page contents */ $titleText = $this->title(); $inlineStyle = $this->inlineStyle(); $this->emitHeaders($titleText, $inlineStyle); echo "<body>\n\n"; $this->generateBodyContents(); echo "</body>\n\n"; echo "</html>\n\n"; } protected function emitHeaders($titleText, $inlineStyle) { echo <<<EOHEADERS <html> <head> <title>{$titleText}</title> <style type='text/css' media='all'> body { font-family: Arial, Helvetica; } {$inlineStyle} </style> </head> EOHEADERS; } } ?> I know i can change the <style type='text/css' media='all'> to match this <link rel='stylesheet' type='text/css' href='mystyle.css'> but i am not sure how to change the rest of it.
  14. OK, the inline css is working fine. However; when I attempt to make the inline css into an external css page it does not work. My question is How do I add the external css properly? here is the code with inline css <?php require_once('requires.php'); require_once('Photos.php'); class CreateAccountPage extends PhotoShareBase { public function __construct() { parent::__construct(); } public function title() { return 'Create Account'; } public function inlineStyle() { $style = <<<EOSTYLE label { margin-top: 0.5em; display: block; font-family: Arial, Helvetica; font-size: 10pt; color: #444; /* Name of forms */ } EOSTYLE; return parent::inlineStyle() . $style; } protected function generateBodyContents() { parent::generateBodyContents(); if (User::amILoggedIn()) { echo 'Sorry, you can\'t be logged in when viewing this page'; return; } echo <<<EOCONTENTS <h3>Create a New User Account</h3> <form method='post' action='SubmitAccountData.php' name='create_user_form'> <div> <label>User Name:</label> <input type='text' name='user_name' size='30'> </div> <div> <label>Full Name:</label> <input type='text' name='full_name' size='30'> </div> <div> <label>Password:</label> <input type='password' name='password1' size='20'> </div> <div> <label>Password (confirm):</label> <input type='password' name='password2' size='20'> </div> <div> <label>Email Address:</label> <input type='text' name='email_address' size='30'> </div> <div> <label>User Bio:</label> <textarea name='user_bio' rows='10' cols='40'></textarea> </div> <p><input type='submit' value='Create User'></p> </form> EOCONTENTS; } } $page = new CreateAccountPage(); $page->processRequest(); ?> And here is the code when I made the external link. <?php require_once('requires.php'); require_once('Photos.php'); class CreateAccountPage extends PhotoShareBase { public function __construct() { parent::__construct(); } public function title() { return 'Create Account'; } public function inlineStyle() { $style = <<<EOSTYLE <link rel='stylesheet' type='text/css' href='mystyle.css'> EOSTYLE; return parent::inlineStyle() . $style; } protected function generateBodyContents() { parent::generateBodyContents(); if (User::amILoggedIn()) { echo 'Sorry, you can\'t be logged in when viewing this page'; return; } echo <<<EOCONTENTS <h3>Create a New User Account</h3> <form method='post' action='SubmitAccountData.php' name='create_user_form'> <div> <label>User Name:</label> <input type='text' name='user_name' size='30'> </div> <div> <label>Full Name:</label> <input type='text' name='full_name' size='30'> </div> <div> <label>Password:</label> <input type='password' name='password1' size='20'> </div> <div> <label>Password (confirm):</label> <input type='password' name='password2' size='20'> </div> <div> <label>Email Address:</label> <input type='text' name='email_address' size='30'> </div> <div> <label>User Bio:</label> <textarea name='user_bio' rows='10' cols='40'></textarea> </div> <p><input type='submit' value='Create User'></p> </form> EOCONTENTS; } } $page = new CreateAccountPage(); $page->processRequest(); ?>
×
×
  • 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.