Jump to content

priti

Members
  • Posts

    461
  • Joined

  • Last visited

Posts posted by priti

  1. one way is

     

    $sports = array(baseball, soccer, tennis);

    $str = implode(",",$sports);

    $pos = strrpos($str,',');

    $final_str = substr($str,0,$pos).' and '.substr($str,($pos+1),strlen($str));

    echo $final_str;

     

    there may be other ways also...

     

     

  2. modify

    echo '<select name= "displayname">';

    $value_for_select = $array["Email"]

    echo "<option value=\"$value_for_select\">$text_for_select</option>\n"; 

     

    in other part

    <?php 

        if($_POST){

        $to = $_POST['displayname']; //this will give you the to email address

        $subject = "WHAT SHOULD THIS BE";   

        $message  =  "Date: $date\n\r".

                    "Dear $First_Name, $Last_Name,\n\r".

                    "Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah.Blah Blah BLah..\n\r".

                   

                    "Sincerely,\n".

                    "$name \n".

                    "$street \n".

                    "$city, $zip \n".

                    "$email \\n".

        $headers = "From: $email";

        mail($to, $subject, $message, $headers);

        // SUCCESS!

        echo '<p class="notice">'.

            'Thank you for your submission.  '.

              '</p>';

        // clear out the variables for good-housekeeping

        unset($date,$legislator,$bill,$name,$street,$city,$zip,$email);

        $_POST = array();

    }

    ?>

     

     

    to understand more what your $_POST contains try print_r($_POST)

  3. $query=mysql_query("SELECT * FROM table1");

    $rownum=mysql_num_rows($query); // you are fetching all records from table1

     

    for($i=0;$i<$rownum;$i++)

    {

        $query=mysql_query("SELECT * FROM table1 LIMIT $i,1"); //why this is required here? you already fetched records from table1

        while($select=mysql_fetch_array($query))

        {

            $update=mysql_query("UPDATE table2 SET cat_num='$select[cat_num]'+$marks"); // print the update query

        }

    }

  4. Please check

     

    $check_fname = mysql_query("SELECT * FROM `roster` WHERE `name`='$formatname'") or die(mysql_error()); 

     

    //$check_fname contains the result set.But in function -mysql_num_rows you are referring to '$check_members'

     

    mysql_num_rows($check_members)

     

    Kindly try,  mysql_num_rows($check_fname) ..

     

    Let us know if it works.

  5. Can you help us to know, Which one is causing issue

    $this->mProdCat = (int)Catalog::GetCategoryByProduct($this->_mProductId); // you say this is main issue

    OR

    $this->mProductSize = Catalog::GetProdsByCategory($this->mProdCat); //you say you are using this

     

    Both are different functions ? I got confused sorry.

     

    Secondly, In first function variable name is '$this->_mProductId' and in another '$this->mProdCat'. Please make sure it is not like this - '$this->_mProdCat'.

     

    Do let us know further to help you.

     

  6. Why you have kept the "." around GAME_DIRECTORY?

     

    you have defined the constant like - define("GAME_DIRECTORY", $row['path']);

     

    then use as below

     

    $ft["settings"]["DIR"]              = GAME_DIRECTORY ;

     

    Let us know what error you are facing?

     

    Thanks

     

     

     

  7. try

     

    $menu = '<script type="text/javascript">

                  if (!FlashDetect.versionAtLeast(8)) {

                    // Dont have flash 8 or later

                    var content = "<b><font color=#FF0000>Install flash 8 or later!</font></b>";

                    document.write(content);     

                  } else {

                    var content = "<p>Hi, you have flash 8 or later.</p>";

                    document.write(content);

                  }

                </script>';

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