User Profile

Collapse

Profile Sidebar

Collapse
vinceboy
vinceboy
Last Activity: Oct 14 '07, 01:43 PM
Joined: Sep 23 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • If I refer member_id as below, the INSERT statement can't work.....

    Code:
    $foreign1 = "SELECT member_id FROM member WHERE   email = \"" . $_SESSION['gmemberid'] . "\" "; 
    
      $sql = sprintf("INSERT INTO `reserve` (`reserve_datetime`, `seat_qty`, `ref_code`, `movie_id`, `member_id`) VALUES ('%s', '%s', '%s', '1', '$foreign1')",  $date, $noOfSeat, $refCode); 
     mysql_query($sql);
    See more | Go to post

    Leave a comment:


  • vinceboy
    started a topic How to make foreign key linking in INSERT statement?
    in PHP

    How to make foreign key linking in INSERT statement?

    Hey..guys! I have INSERTstatement here which have two foreign keys that need to refer to other tables.How can I achieve it?

    Code:
    $sql = sprintf("INSERT INTO `reserve` (`reserve_datetime`, `seat_qty`, `ref_code`, `movie_id`, `member_id`) VALUES ('%s', '%s', '%s', '1', '1')", $date, $noOfSeat, $refCode);
    movie_id and member_id are foreign keys that linked to movie and member tables respectively.Th anks...
    See more | Go to post

  • vinceboy
    replied to $_POST Problem
    in PHP
    Thanks.Then how can display 'name' and 'screening time' by using $_POST or $_REQUEST??Both of them are dynamically display in PHP
    See more | Go to post

    Leave a comment:


  • vinceboy
    started a topic $_POST Problem
    in PHP

    $_POST Problem

    Hi...guys! I have a form which consists of drop down menu and radio button..I would like to output the selected value in next page by using $_POST.How can capture them?It is urgent for me,thanks for generious help

    Code:
     <select name="rNumber" title="number of ticket">
                          <option selected>Select</option>
                          <option>01</option>
    ...
    See more | Go to post
    Last edited by Atli; Sep 27 '07, 01:42 AM. Reason: Made the long line of --- shorter so it would fit better.

  • Solved already,Thanks a lot.Now validation control well but only thing can't display value in next page.
    See more | Go to post

    Leave a comment:


  • Can you help me to work out?Thanks for generious help....
    See more | Go to post

    Leave a comment:


  • I have changed accessing method to POST,however how can I display both selected value in next page without using GoToNextPage function,onchan ge and onclick?
    $_POST[' ?']
    See more | Go to post

    Leave a comment:


  • vinceboy
    started a topic Capture Complex Dynamic Display Data
    in PHP

    Capture Complex Dynamic Display Data

    Hi..guys.I have a form below which consists of movie name as label and its screening time as radio button.What I intend to do when user selected a particular radio button,the corresponding movie name will be captured and dispalyed in next page.

    [PHP]
    <?
    if (isset($_SESSIO N['gmemberid'])) {

    $tbl_name = "movie";
    $result = mysql_query(spr intf('SELECT name,classifica tion,screeningT ime...
    See more | Go to post

  • You meant that changed onchange and onclick to onsubmit?
    See more | Go to post

    Leave a comment:


  • I can't remove it because need to display the number of ticket in next page.
    [PHP]<?= $_GET['selected_no_ti cket']; ?>[/PHP]

    What I intend to do is capturing the selected value and display it in next page.In the form I have radio button and drop down menu which apply onclick and onchange attribute respectively in a single function.

    Code:
     function GoToNextPage(value){
            if(value != ""){
    ...
    See more | Go to post

    Leave a comment:


  • vinceboy
    replied to PHP string function
    in PHP
    Problem resolved,thanks ..my string only has a zero in leading position.
    See more | Go to post

    Leave a comment:


  • vinceboy
    started a topic PHP string function
    in PHP

    PHP string function

    Hi..guys!What is the string function that cut 01,02,03 to 1,2,3?Thanks...
    See more | Go to post

  • How to prevent auto redirect of drop down menu?

    Hi..guys!I have a drop down menu with javascript null validation.Howe ver,instead of clicking submit button,it will immediately auto redirect after option was selected.Is it possible to prevent this kind of fast respond?

    Code:
    <select name="rNumber" title="number of ticket"
    					 onChange="GoToNextPage(this.value)">
                          <option selected>Select</option>
    ...
    See more | Go to post

  • vinceboy
    replied to Unstoppable Form Validation
    Thanks for reply.Problem resolved.

    Code:
    <form action="" method="post" name="movieList" 
    		  onSubmit="return validate(this);">
    
    <script language="JavaScript" type="text/JavaScript">
        function validate(which) {
            var selects = which.getElementsByTagName('select');
            var radios = which.getElementsByTagName('input');
    ...
    See more | Go to post

    Leave a comment:


  • vinceboy
    started a topic Unstoppable Form Validation

    Unstoppable Form Validation

    Hi..guys! I have a function here to validate null selection of drop down menu and radio button.However, it seems like alert box couldn't be stopped display even though both fileds were already selected.Thanks for your generious help

    Code:
    <script language="JavaScript" type="text/JavaScript">
    function nullValidation() {
        var x=document.getElementById("movieList");
        for
    ...
    See more | Go to post

  • Problem resolved.Thanks a lot.
    See more | Go to post

    Leave a comment:


  • Problem resolved.Thanks a lot.
    See more | Go to post

    Leave a comment:


  • vinceboy
    replied to Drop down menu failed to validate
    Actually the <form>tag was placed wrongly.However ,when mixed with another dynamic radio button written in PHP,the validation of radio button become failed.

    Code:
    <script language="JavaScript" type="text/JavaScript">
    function formSubmit(ticket)
    {
    	var returnStatus = 1;
    
        if (ticket.rNumber.selectedIndex == 0){ 
    		alert("Please select number of ticket!");
    ...
    See more | Go to post

    Leave a comment:


  • vinceboy
    started a topic Drop down menu failed to validate

    Drop down menu failed to validate

    Hi..guys.I have a static display drop down menu,however it doesn't go through the validation function when option is not selected.Thanks for your generious help...

    Code:
    <script language="JavaScript" type="text/JavaScript">
    function formSubmit(ticket)
    {
    	var returnStatus = 1;
    
        if (ticket.rNumber.selectedIndex == 0) { 
    		alert("Please select number of ticket!");
    ...
    See more | Go to post

  • Loading different flash elements with session control

    Hi..guys.I am newbie here and have a page which need to load two different flash element with session control.However something went wrong in the code and cause the first if clause is not working.I try to echo out what I want before the if clause but it displayed nothing. Thanks for your generious help..

    [PHP]
    <?php
    echo $_SESSION['gmemberid'];
    if (isset($_SESSIO N['gmemberid'])){

    ?> ...
    See more | Go to post
No activity results to display
Show More
Working...