Jump to content

biggieuk

Members
  • Posts

    159
  • Joined

  • Last visited

Posts posted by biggieuk

  1. hi,

     

    I have a form with a list/menu (populated dynamically from DB) and a text area.

     

    I want to be able to select a value from the listmenu and the textarea automatically retrieves the data from the database corresponding to that listmenu value.

     

    What would be the best way of doing this?

     

    thanks

     

     

  2. Hi,

     

    I have two tables like so:

     

    session

    +----------+----------+----------+----------+

    |  groupid  |  group    |  mentor  |  room    | 

    +----------+----------+----------+----------+

    |      1      |  Sports  |  bob      |  l657      |

     

     

    resource

    +----------+----------+----------+----------+

    | resourceid|  name    |    path    |  groupid  | 

    +----------+----------+----------+----------+

    |      1      |  ball      | ../1.jpg  |      1      |

     

     

    Resources are assigned to a certain group and so the groupid is added to the resource table.

     

    I need to display a repeating table but i am unsure about the sql code that will enable me to get the following:

     

    +----------+----------+----------+----------+

    |  group    |  mentor  |    room  |  path    | 

    +----------+----------+----------+----------+

     

    i need the path column to only contain a value for the groups that have had a resource assigned to them.

     

    Help would be appreciated.

     

     

  3. Hi all,

     

    I have a dynamic box on the admin section of my website where the admin can set the number of selectable sessions from the booking form.

     

    I do not want to have to add/remove columns in my 'sessions' table to reflect this number so im wondering if there is a way to store values in a database separated by commas and read them back individually?

     

    This would allow me to store values one after another in a single field, e.g. t1,t4,t6,t7 . If there is a better method i could use please share your thoughts.

     

    thanks

  4. Hi all,

     

    I have a dynamic booking form, with two repeating tables to display a series of sessions and an extra category containing checkboxes. Table1 contains information about morning sessions ($query_sessionAM = "SELECT * FROM sessions WHERE ampm = 'am'";), Table2 contains all afternoon sessions ($query_sessionPM = "SELECT * FROM sessions WHERE ampm = 'pm'";).

     

    I have dynamically assigned each checkbox a name using  "check" + 'sessionid' (e.g.  Check12).

     

    My problem is that users should be able to select 1 or 2 choices from the morning sessions and 1 or 2 from the afternoon sessions. How can i make it so that a maximum of 2 sessions per table can be selected?

     

    This number may also be changed in future so a dynamic session choice would be an advantage.

     

    If anybody can give me guidance towards this then it would be much appreciated!

     

    thanks

     

     

  5. Hi all,

     

    I have some CSS code that works correctly in Firefox but not IE. A debug tells me that there are a couple of properties that are unsupported such as:

     

    • border-spacing
    • 'transparent'

     

    My CSS code is here:

     

    <style type="text/css">
    hr.pme-hr		     {
    border: 0px solid;
    padding: 0px;
    margin: 0px;
    border-top-width: 1px;
    height: 1px;
    background-color: #FFFFFF;
    font-family: Verdana;
    font-size: small;
    color: #FFFFFF;
    }
    table.pme-main 	     {
    border: 1px solid #0099FF;
    border-collapse: collapse;
    border-spacing: 0px;
    width: 100%;
    background-color: #FFFFFF;
    color: #000000;
    font-family: Verdana;
    font-size: small;
    }
    table.pme-navigation {
    border: 0px solid #0099FF;
    border-collapse: collapse;
    border-spacing: 0px;
    width: 100%;
    color: #000000;
    background-color: #F0EEED;
    font-family: Verdana;
    font-size: small;
    }
    td.pme-navigation-0, td.pme-navigation-1 {
    white-space: nowrap;
    background-color: #F0EEED;
    }
    th.pme-header	     {
    border: 1px solid #0066FF;
    padding: 4px;
    color: #000000;
    background-color: #A3C1D3;
    }
    td.pme-key-0, td.pme-value-0, td.pme-help-0, td.pme-navigation-0, td.pme-cell-0,
    td.pme-key-1, td.pme-value-1, td.pme-help-0, td.pme-navigation-1, td.pme-cell-1,
    td.pme-sortinfo, td.pme-filter { border: #004d9c 1px solid; padding: 3px; }
    td.pme-buttons {
    text-align: left;
    color: #FFFFFF;
    background-color: #F0EEED;
    }
    td.pme-message { text-align: center; }
    td.pme-stats   {
    text-align: right;
    font-family: Verdana;
    font-size: small;
    color: #000000;
    }
    .style1 {
    font-family: Verdana;
    font-size: small;
    color: #000000;
    }
    </style>
    
    

     

    Does anybody know how i can change this CSS to be compatiable with IE?

     

    Help is greatly appreciated!

     

    thanks

  6. Your not going to like it, i used Dreamweaver to dynamically populate the listmenu  ::)

     

    <select name="select2" id="select2" disabled = "disabled">
        <?php
    do {  
    ?>
        <option value="<?php echo $row_users['email']?>"<?php if (!(strcmp($row_users['email'], $row_users['email']))) {echo "selected=\"selected\"";} ?>><?php echo $row_users['username']?></option>
        <?php
    } while ($row_users = mysql_fetch_assoc($users));
      $rows = mysql_num_rows($users);
      if($rows > 0) {
          mysql_data_seek($users, 0);
      $row_users = mysql_fetch_assoc($users);
      }
    ?>
      </select>
    

  7. Hi,

     

    Im having trouble assigning the value of a listmenu item to a variable.

     

    the listmenu is populated dynamically from a database using 'username' as the label and 'email' as the value.

     

    I need to assign the 'email' value of the selected item to a variable.

     

    Can anybody please give me some guidance.

     

    Thanks

  8. thanks for your reply.

     

    I have another related question.

     

    There are a number of email addresses stored in a database. I need to be able to click a button on my website and an e-mail is sent to each person.

     

    Is this possible and what would be the best method?

     

    Thanks again.

  9. Hi all,

     

    I have a mysql database with a list of users including their e-mail address.

     

    I need to be able to automatically send a mass php generated e-mail upon a pre-determined date. Is this possible?

     

    Or would it be easier for the admin to login to the admin area and click send on the actual date that the emails are to be sent?

     

    thanks.

     

     

  10. Hi,

     

    Im needing some advice with a layout i have created.

     

    I have attached an image showing what i am trying to do.

     

    helpimage.jpg

     

     

    The 'Centered Image' is an image that is set to 'Relative' positioning.

     

    Container 1 & 2, I want these to stay in the same position but load different content. much like the use of Frames.

     

    Whats the best way to do this? (I currently only have the main image centered & set to relative)

     

    Thanks for help with this!

  11. Hi all,

     

    Just wondering if anybody has used the new YouTube video upload API?

     

    I am trying to understand the guide posted on the youtube developer site but am struggling a little with it.

     

    If anybody has an example of this working or has used it and can give me some advice it would be much appreciated.

     

    Thanks,

     

    Dan

  12. Hi,

     

    I am creating an application that connects to various API's such as Youtube, Flickr etc..

     

    In the event that these API's are no longer available in the future is it possible to put code into a database and use it within the application?

     

    thanks,

     

    Dan

  13. thanks for your reply.

     

    I have decided to go for a fixed centred column so that my content remains in the middle of the browser no matter what resolution.

     

    If i was to add a form into the centre with some textboxes on, how can i get them to stay in the same spot on the image if the browser size is shrunk or enlarged? At the moment, the textboxes are moving around instead of staying where they should be in relation to the image?

     

    thanks.

  14. Hi,

     

    I am in need of some help and advice with a layout i am creating.

     

    Using photoshop i have created an interface, Ive attatched a very brief example of the interface layout.

     

    I have made slices to the left and right so that there are 3 columns overall.

     

    I need it so that whatever the users resolution the centre (main content) part stays in the middle of the browser, whilst the two images either side expand and retract.

     

     

    Another issue i have is that im not sure how i can add text/ images over the middle part when in Dreamweaver as i cannot type over an image?

     

     

    Thanks for any help with this,

     

    Dan

  15. Thanks for the reply. I have a few questions,

     

    Would i need 'id' if the username for each user will be unique?

     

    I am unsure of the data that will be stored in the Media table. Could you give examples of data that may be stored in these?

     

    e.g.

     

    id  |    user_id  |  mediatype_id  |  data

    -------------------------------------------

    ?  |        ?      |          ?          |    ?

     

     

     

     

    I need to be able to run a query and find all of the media for that user.

     

    Thanks again,

     

    Dan

  16. Hi all,

     

    I am creating an online application where the user can login and upload audio, images and video to various servers.

     

    I have created a login table consisting of username, password.

     

    I am unsure of the best approach of storing the addresses for the uploaded media. Would it be best to dynamically create a table named by username that lists all of the uploaded media for that user?

     

    I need to do this so that when the user logs in to my application, their uploaded media can be displayed in order of audio, vid, and images.

     

    Any ideas or advice is appreciated!

     

    Dan.

  17. Hi all,

     

    Im looking for advice and guidance to achieve the following results.

     

    I am using PHPTube - http://kamleitner.com/code/phptube-youtube-api-f-video-upload-download/ (This enables me to upload the file to my server then upload that file automatically to youtube.)

     

    I want to have a web page that allows the user to browse for a video file and click submit to upload this file to my server. I have managed to get this part working. I am looking to enhance this a little by displaying a progression bar or animation on the same page whilst the upload is taking place.

     

    Currently once the Submit button has been clicked a seperate .php page is loaded which displays the following details:

     

    <?php
    
    if ($_FILES["file"]["size"] < 500000)
      {
      if ($_FILES["file"]["error"] > 0)
        {
        echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
        }
      else
        {
        echo "Upload: " . $_FILES["file"]["name"] . "<br />";
        echo "Type: " . $_FILES["file"]["type"] . "<br />";
        echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
        echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />";
    echo "<img src='load.gif'>";
    
        if (file_exists("upload/" . $_FILES["file"]["name"]))
          {
          echo $_FILES["file"]["name"] . " already exists. ";
          }
        else
          {
          move_uploaded_file($_FILES["file"]["tmp_name"],
          "upload/" . $_FILES["file"]["name"]);
          echo "Stored in: " . "upload/" . $_FILES["file"]["name"];
      
      
      //upload video to youtube
    
    include_once ("phptube.php");
    
    //$tube = new PHPTube ();
    //$tube->download("yTF3jS16Sbc","demo.flv");
    
    $tube = new PHPTube ($_POST["uName"],$_POST["uPass"]);
    $id = $tube->upload ("upload/" . $_FILES["file"]["name"], $_POST["uTitle"], $_POST["uTags"], $_POST["uDescription"],10, "EN", $_POST["uPublic"]);
    
    
          }
        }
      }
      
    
    else
      {
      echo "Invalid file";
      }
    
    ?>
    

     

    Does anybody have any idea how i can upload the file to my server without loading up a separate page and display an upload animation whilst doing so?

     

    thanks for help with this.

     

    Dan

×
×
  • 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.