Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 25th, 2003, 09:22 AM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Run a signin script to sign a guestbook

I have been trying for myself to create a guestbook but i
haven't got some experience with web programming.
I have downloaded .the program PHP Coder Pro

I have created the files sign.php, dbconnect.php and a create_entry.php
When i want to run my sign.php form and i click on the button sign then i get a message file download, do wou want to save, open or cancel the file create_entry.php
Is this normal because afterwards i can't open create_entry.php
and my data which i filled in on my sign.php form isn't in the database either.

Can you help me ??
Thx
 
Old June 25th, 2003, 11:38 AM
Authorized User
 
Join Date: Jun 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to natmaster Send a message via AIM to natmaster Send a message via MSN to natmaster
Default

have you written any of the php yourself or does this program do it for you?

----------------------------
Oh happyland!
 
Old June 26th, 2003, 02:09 AM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've took some examples together and started with that,
that program just gives some more color to make my program more clear.

This is my code from the file sign.php :

<h2>Sign my guest book!!</h2>
<form method=post action="C:\PHP\apache\htdocs\create_entry.php">
      <b>Naam :</b>
      <input type=text size=40 name=name>
      <br>
      <b>Locatie :</b>
      <input type=text size=40 name=location>
      <br>
      <b>Email :</b>
      <input type=text size=40 name=email>
      <br>
      <b>Home page URL :</b>
      <input type=text size=40 name=url>
      <br>
      <b>Commentaar :</b>
      <textarea name=comments cols=40 rows=4 wrap=virtual></textarea>
      <br>
      <input type=submit name=submit value="Sign!">
      <input type=reset name=reset value="Start over">
</form>
 
Old June 26th, 2003, 01:16 PM
Authorized User
 
Join Date: Jun 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to natmaster Send a message via AIM to natmaster Send a message via MSN to natmaster
Default

are you running on a windows server?

----------------------------
Oh happyland!
 
Old June 27th, 2003, 07:10 AM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, i downloaded apache 1.3.14
When i run the application and i select a link then PHP asks me to open or save.
When i open the file, nothing happens. But when i refresh then i go to the next screen as it needs to be but my program haven't made the changes i requested in the database.
 
Old June 29th, 2003, 05:04 PM
Authorized User
 
Join Date: Jun 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to natmaster Send a message via AIM to natmaster Send a message via MSN to natmaster
Default

i'm confused, do you mean some kind of text editor is having problems opening your files, or does your script not work?

----------------------------
Oh happyland!
 
Old July 1st, 2003, 04:43 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by natmaster
 are you running on a windows server?

Quote:
quote:
Quote:
quote:
<form method=post action="C:\PHP\apache\htdocs\create_entry.php">
Yes, he's running on a WierdOS server: an Apache WierdOS server, but a WierdOS server, nonetheless :).

FWIW, the form action should be a path your webserver understands, (i.e. just "create_entry.php", in this case, not a physical path that runs from the root of your hard drive ;) ).

Dan

----------------------------
Oh happyland!
 
Old July 1st, 2003, 12:35 PM
Authorized User
 
Join Date: Jun 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to natmaster Send a message via AIM to natmaster Send a message via MSN to natmaster
Default

yeah, that's what i was trying to get at Dan, i was thinking that speedy might be having access problems but i just got confused :P.

what it is doing speedy, is sending you to a file location for download, rather than redirecting to another http page. if you use the C:\... than your protocol will change

----------------------------
http://aod.genesismuds.com
 
Old July 2nd, 2003, 06:50 AM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry but now i'm confused.
In the beginning i used the file create_entry.php without the fysical directory but nothing happened afterwards.
Then i used the directory but this ran not as i hoped.
I use the PHP Coder from www.phpide.de, i think i'll better search for a manual about this development environment.
 
Old July 2nd, 2003, 08:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, in that case, your problem must lie in your create_entry.php file, not the file you are POSTing the values from: nothing happened because of a fault in the page that was recieving the values from the form. The problem about being asked to download the create_entry.php file, rather than simply running it, is secondary to your original problem, and has been caused by specifying the physical path to the PHP file, rather than a path relative to the Apache server's web-root directory. Unless the file is requested from somewhere on the webserver's web-directory structure a server-side scripted file (of any type, on any webserver I know of - be it PHP, ASP, CFMX, or whathaveyou) will not be run through the webserver's scripting language interpreter, but will instead be offered as-is.

Dan


Quote:
quote:Originally posted by speedyH
 Sorry but now i'm confused.
In the beginning i used the file create_entry.php without the fysical directory but nothing happened afterwards.
Then i used the directory but this ran not as i hoped.
I use the PHP Coder from www.phpide.de, i think i'll better search for a manual about this development environment.





Similar Threads
Thread Thread Starter Forum Replies Last Post
cant run my script! angelic_scars Beginning PHP 1 November 9th, 2006 12:17 AM
Script causes IE to run slowly TSEROOGY Javascript 1 October 7th, 2004 05:39 PM
run asp script from aspx PostmanPat C# 3 September 14th, 2004 12:58 PM
Run Script via Forms 6i bilal Oracle 0 August 12th, 2003 11:47 PM
Call and run CGI script from a PHP script ... how? dbruins BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 June 10th, 2003 03:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.