SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: smarty question

  1. #1
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    smarty question

    Hi,

    Im using smarty...i want to submit a form to a different script....so i have this...as you would expect:


    PHP Code:
    <form action="/results.php" method="POST"
    but it does not submit the form to results when i click on the submit button within the form......theres nothing else wrong with the code...

    So you have to do something in different to get this working with smarty??

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    If it doesn't submit, what does it do then?

    Are you sure the address is "/results.php" and not "results.php" ?

    Validate the html of the page that smarty is making for you, make sure the form is properly made.

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    it doesnt do anything...it just refreshes the page im on when i perform the search....its definately theright address...although i have tried it without the /....the form is formed ok...i dont know why it wont submit

  4. #4
    SitePoint Addict Wildhoney's Avatar
    Join Date
    Apr 2006
    Location
    Nottingham
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Cups View Post
    If it doesn't submit, what does it do then?

    Are you sure the address is "/results.php" and not "results.php" ?

    Validate the html of the page that smarty is making for you, make sure the form is properly made.
    ./results.php, /results.php, results.php - it's all the same as the forward slash is relative to the current location. I'd be inclined to say your submit button is not a submit but a button OR your submit button is not contained within the form.
    TalkPHP.com - The Friendly PHP Community

    Watch Reaper Online - Watch Chuck Online

  5. #5
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,

    The submit button is def in the form....its a submit...an image submit

    <input type="image" name="submit_search">

    i must be missong something

  6. #6
    play of mind Ernie1's Avatar
    Join Date
    Sep 2005
    Posts
    1,252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <input type="image" name="name" src="imageURL" value="value" alt="alternate" />
    my mobile portal
    ghiris.ro

  7. #7
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah sorry...being lazy there....i have all that...the image is being output.....i think im going to have to devote some more time to debudding this as it doesnt appear to be smarty problem

  8. #8
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Yeah, if html has dark corners for you, then every day is going to be a bad day...

    Im using smarty...i want to submit a form to a different script....so i have this...as you would expect:
    I read that to mean you only changed the action of the form. Silly of me.

  9. #9
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After a debugging session on the train home last night i discovered my form was submitting to results.php but i had some logic in an included file that was redirecting back to index every time is submitted the search because certain get variables were not set..schoolboy error...sorry to waste everyones time


Bookmarks

Posting Permissions

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