Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send data to a new page from submit

    Hi there

    I just posted a question to the Javascript area, but was advised to check this forum for PHP... I have no clue where to start as I do not know any PHP (I have seen it, but have never programmed with it).

    Basically what I want to do is have 3 select lists, where the user selects their birthdate (one select list for day, one for month and one for year), then they click on the submit button, which needs to take them to the relevant page for their star sign. Below is the javascript post I made that has the javascript code to make a javascript pop-up telling the user whattheir star sign is...

    Trying to pass user info into a new window

    I am sure there must be some code for this somewhere, surely? I have been searching google for some code, but havent as yet found what I want...

    Any possibility of help on this one??

    Thanks
    Natasha

  • #2
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    if using POST for the method use
    PHP Code:
    $dob $_POST['day''./.'$_POST['month']'./.'$_POST['year'];
    //this will be 09/05/1987
    $star $_POST['day']'./.'$_POST['month'];
    //this is now shortened to 09/05
    //use arrays() to keep in which starsign they are
    $capricorn range(01/0201/03);
    //now use a switch to see which starsign they are in, 
    obviously this is not full and or correct code, its provided as an example

  • #3
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for that, I think I understand what you're saying... looks pretty logical... obviously there is more to it....

    Now my next question is - where can I find step-by-step, really basic and simple instructions on how to install and IIS server on my computer, so that I can play with the PHP scripts and see what they output? At present, I can only upload the pages to my web host, which is fine, as I can make delete it after testings, but its a rather laborious way of doing things...

    Appreciate any pointers on this?

    Thanks
    Natasha

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    You might want to check out WAMP, which is an easy way to install Apache (server), PHP, and MySQL.

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #5
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    or XAMPP

  • #6
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thats what I wanted!

    I was looking into installing Apache server (with PHP playability) before, but I was trying to do it from Apache and it just went straight over my head.... those two links to these applications are just what I need!!

    Thanks a lot

  • #7
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay I have downloaded both of these applications... read about what the difference between them is and looked at who prefers one over the other and I cannot decide which one to use, everyone seems to have their own opinion about which one is easier...

    Which one would be better for the complete and utter novice to test servers and PHP etc?? Like seriously no clue user.... I am quick to learn, but right now, no clue...

  • #8
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    The biggest difference for you between the two is that XAMPP installs Perl along with PHP. If you aren't interested with Perl, you could just use WAMP, but if you think you might use that in the future, you might as well go the extra mile and grab XAMPP.

    (I'm assuming that you're using windows, since you referred to IIS)

    HTH
    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #9
    Banned
    Join Date
    Apr 2007
    Posts
    428
    Thanks
    29
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by natasha15 View Post
    I am quick to learn, but right now, no clue...
    Few things you need to learn about are

    What is web server

    Then what is server side scripting

    And then PHP

    It may look like a lot's of reading, but it's sure gonna set you off to a good road of web programming. If you programmed before, it's not gonna be a problem, if you didn't, than it might sound to weird. Programming is weird, and you might turn into geek, but that's just professional deformation.. :lol:

  • #10
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the responses - I think I will go with WAMP as I probably wont be using Perl And yeah I am using Windows OS.... and I will check out those links too

    Programming, yeah I try to avoid it as much as I can, but I just keep on going down that road lol

  • #11
    Regular Coder saeed's Avatar
    Join Date
    Oct 2002
    Location
    West Yorkshire
    Posts
    343
    Thanks
    32
    Thanked 0 Times in 0 Posts
    web link

    PHP Programming for Beginners

    very good website

    ATB


    cheers,

    Saeed.

  • #12
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the link - I have been on that site....

    Okay, I downloaded WAMP and I am a bit lost!!

    Umm, I am having some difficulty in understanding how to view my files - I am not understanding the directory structure of the local host... I have a few different web sites I need to test and view the php files, and I got one of them to work, did the same thing for the other one and it didnt give me a preview ?? I am doing something wrong, but I dont know what... normally I can work things out, but this has me stumped...

    I have never working with a local testing server and am really keen to do so, but I dont know what to do.... I am using windows and have IIS installed...

    Is there any site / info anyone can point me to, to help me understand what I am doing?

    Thanks
    Natasha

  • #13
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Make sure WAMP is running - it might be blocked on startup by an antivirus program.

    Make sure your files are in the correct directory:
    (I think the defalt is C:\wamp\www)

    Place a folder containing your entire website inside the folder above, or wherever your server root is, if you didn't use the default.

    Then try to access it via a browser by pointing the browser at localhost/"name of the subfolder containing your entire website"

    You can put as many sites in the root directory as you want, but put each site in its own folder, like this:

    C:\wamp\www
    -site1
    -site2
    -site3
    -etc

    localhost/site1 is the URL for the first site, localhost/site2 is the URL for the third site, etc.

    HTH
    Dan
    Last edited by whizard; 07-28-2007 at 01:46 AM.
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #14
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dan - thanks

    Thats exactly what I did (other than putting the localhost/site1 as the URL)... I figured out that I had to add the site files in the wamp/www folder (when I saw that the php file that did preview properly in browser got copied there)....

    I am running Dreamweaver, and I specified the following in the testing server tab of the site management tool:

    Server Model - PHP/MySQL
    Access - Local/Network
    Testing Server Folder - C:\wamp\www\mysite
    URL Prefix - http://localhost/

    Is there something I am missing???

  • #15
    New Coder
    Join Date
    Jul 2007
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have tried it with:
    URL Prefix - http://localhost/mysite

    and it didnt work either - kept giving me the following error message:

    The site URL prefix for the testing server does not match the site URL prefix specified in the HTTP address for the site. This may cause pages using site relative links to display incorrectly at runtime. Proceed anyway?


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •