Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Virus, Spyware, and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


 
Reply to this topicStart new topic
> PHP, forms, and symfony 1.2, How to use multiple forms??
petocities
post Apr 25 2009, 11:24 AM
Post #1


Member
**

Group: Members
Posts: 94
Joined: 3-June 06
From: Santiago Chile
Member No.: 70,596



Hello everyone.
First off, I'm working in Gnome, with netBeans and the Symfony framework (v 1.2.4)
I guess what i'm trying to do is quite simple, but as for I am quite new to php, and also to symfony, I'm having a hard time to do it.
Basically, what I want to do is to show some options (just plain html text), but have a form for each option. The first option is to input a date to make a SQL query in a DB, and the second option is to upload a file. I have both of 'em working, but not in the same template. The following code should be enough, for it is quite simple code:
indexSuccess.php
CODE
<div>
    <h1>Administratork</h1>

    <h3>Option 1</h3>
    <?php include_partial('formGenerate', array('formGenerate' => $formGenerate)) ?>
    
    <h3><a href="<?php echo url_for('home/upload') ?> ">upload file</a></h3>
</div>


uploadSuccess.php
CODE
<form action="<?php echo url_for('home/previewUpload') ?>" method="POST" enctype ="multipart/form-data" >
  <table>
    <?php echo $fileUpload ?>
    <tr>
      <td colspan="2">
        <input type="submit" />
      </td>
    </tr>
  </table>
</form>


So, the indexSuccess gives the 2 options, but I haven't found a way to show both forms in the same page, so I can get rid of the link to the second page, thus eliminating an unnecesary step for the user. I tried using another include_partial, but it didn't let me (couldn't find the reason behind this). Any/All help is deeply appreciated guys, all coments regarding how to improve my crappy php skills ;)

PD: If more info is needed, please say so.


--------------------
IPB Image
Go to the top of the page
 
+Quote Post
groovicus
post Apr 25 2009, 11:29 AM
Post #2


Hail Groovicus!
******

Group: Site Admin
Posts: 8,435
Joined: 5-June 04
From: Centerville, SD
Member No.: 689



A good place to start is by maybe telling us why you can't put the two snippets of code together?


--------------------
Never Argue With Stupid People



Microsoft Senior Student Partner
Go to the top of the page
 
+Quote Post
petocities
post Apr 25 2009, 12:03 PM
Post #3


Member
**

Group: Members
Posts: 94
Joined: 3-June 06
From: Santiago Chile
Member No.: 70,596



haha, I guess it just didn't occur to me, as they are commonly shown in different files through the tutorials I've seen.
Sorry to bother for such a silly matter, but I'm still really new to html and php.


--------------------
IPB Image
Go to the top of the page
 
+Quote Post
groovicus
post Apr 25 2009, 02:22 PM
Post #4


Hail Groovicus!
******

Group: Site Admin
Posts: 8,435
Joined: 5-June 04
From: Centerville, SD
Member No.: 689



lol.. I didn't mean it that way. I thought that maybe they were throwing an error or something. So you have not just tried putting them into the same .html page?


--------------------
Never Argue With Stupid People



Microsoft Senior Student Partner
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 11th March 2010 - 10:32 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Virus Removal Guides

© 2003-2010 All Rights Reserved Bleeping Computer LLC.