Jump to content

s4salman

Members
  • Posts

    84
  • Joined

  • Last visited

Posts posted by s4salman

  1. Hi, 

    I am using this code, what i want is to random fill up stepa field with either option a or option b every time i refresh the page, any help is highly appreciated!:

     

    <form action="myc.php" method="get">
    
    <label  for="element_1"> </label>
    		<div>
    		<select class="element select medium"  name="stepa"> 
    			<option value="" selected="selected"></option>
    
    
    <option value="option a" >Advanced Human option a</option>
    <option value="option b">Advanced Human Option b</option>
    
    
    
    		</select>
    		</div> 
    
    <br>
    <input type="submit">
    </form>

     

  2. the reason for this is because the html markup is broken.

     

    the value = '...' attribute needs quotes (either single or double quotes are valid) around the value. since this is inside of a double-quoted php string, use single-quotes in the markup.

    Can you please identify the line which is creating the issue. I am not able to figure out your point of view. Thanks

  3. Here the whole file attached herein

    <?php
    $host_name = "localhost";
    $database = "s4salman_jag"; // Change your database name
    $username = "s4salman_jag";          // Your database user id 
    $password = "jag001";          // Your password
    
    //////// Do not Edit below /////////
    try {
    $dbo = new PDO('mysql:host='.$host_name.';dbname='.$database, $username, $password);
    } catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "<br/>";
    die();
    }
    
    ?> 
    
    <?php
       if( $_GET["stepa"] || $_GET["stepaa"]|| $_GET["stepaaa"] || $_GET["stepaaaa"] || $_GET["stepaaaaa"]|| $_GET["stepaaaaaa"] ) {
          
    echo $_GET['filename'];
    
    echo "<br/>";
    echo "0&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp";
    
    echo $_GET['description'];
    echo "<br/>";
    
    echo "1&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp";
    
    echo $_GET['stepa'];
          
          echo '&nbsp';	
          echo $_GET['stepaa'];
    echo '&nbsp';
    echo $_GET['stepaaa'];
    echo '&nbsp';
    echo $_GET['stepaaaa'];
    echo '&nbsp';
    echo $_GET['stepaaaaa'];
    echo $_GET['stepaaaaaa'];
    
            
          echo "<br/>";
    
    
    
    <body>
       
          <form action = "<?php $_PHP_SELF ?>" method = "GET">
    
    
             
             <input type = "submit" />
    
    
    <table border="0">
    <tr>
    <td width="100%" ALIGN="CENTER">
    
    file name<input type="text" name="filename">
    </td>
    </tr>
    
    
    <tr>
    <td width="100%" ALIGN="CENTER">
    
    description<input type="text" name="description">
    </td>
    </tr>
    
    </table>
    
    <table border="0" cellpadding="2" cellspacing="8">
    
    
    
    <tr>
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
    <?php 
       
    $sql="SELECT * FROM tutorial order by field1"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field1]>$row[field1]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="20%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial order by field2"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepaa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field2]>$row[field2]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepaaa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field3]>$row[field3]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
    <?php 
       
    $sql="SELECT * FROM tutorial order by field4"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepaaaa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field4]>$row[field4]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="20%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial order by field5"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepaaaaa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field5]>$row[field5]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepaaaaaa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field6]>$row[field6]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    </tr>
    
    </table>
    
    </body>
    </html>
    
    
  4. This code is only printing the 1st part of the field 6. For example if field 6 has data an oval, so it shows up an oval in the drop down list, But when i submit this form, only an gets printed on the next page. It is not printing whole an oval on the next page what is wrong with the code. Pls help!

    <?php
      
    $sql="SELECT * FROM tutorial"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepaaaaaa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field6]>$row[field6]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
  5. I want to repeat this form 40 times. Can any body help me with php code. Below, is the one row printing 06 drop down list. I want to repeat this thing 40 times. What is mean is that repeate this 06 drop down field 40 times.

    <tr>
    <td width="100%" ALIGN="CENTER">
    
    description<input type="text" name="description">
    </td>
    </tr>
    
    </table>
    
    <table border="0" cellpadding="2" cellspacing="8">
    
    
    
    <tr>
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
    <?php 
       
    $sql="SELECT * FROM tutorial order by field1"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field1]>$row[field1]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="20%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial order by field2"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field2]>$row[field2]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field3]>$row[field3]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
    <?php 
       
    $sql="SELECT * FROM tutorial order by field1"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field1]>$row[field1]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="20%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial order by field2"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field2]>$row[field2]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    
    <td width="10%" ALIGN="CENTER">
    
    
    		<label  for="element_1"> </label>
    		<div>
     
     
    <?php
      
    $sql="SELECT * FROM tutorial"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field3]>$row[field3]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
    
    </div> 
    		
    
    </td>
    
    </tr>
    
  6. Got it to work as:

    <?php
    $host_name = "localhost";
    $database = "s4salman_jag"; // Change your database name
    $username = "s4salman_jag";          // Your database user id 
    $password = "jag001";          // Your password
    
    //////// Do not Edit below /////////
    try {
    $dbo = new PDO('mysql:host='.$host_name.';dbname='.$database, $username, $password);
    } catch (PDOException $e) {
    print "Error!: " . $e->getMessage() . "<br/>";
    die();
    }
    
       
       
    $sql="SELECT * FROM tutorial"; 
    
    
    /* You can add order by clause to the sql statement if the names are to be displayed in alphabetical order */
    
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field1]>$row[field1]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
  7. Anyone could help me out? Drop down list is not populating from mysql table, i could not figured out what is wrong in it.

    <?php
       $dbhost = 'localhost';
       $dbuser = 's4salman_jag';
       $dbpass = 'jag001';
       
       $conn = mysql_connect($dbhost, $dbuser, $dbpass);
       
       if(! $conn ) {
          die('Could not connect: ' . mysql_error());
       }
       
       $sql = 'SELECT * FROM tutorial';
       mysql_select_db('s4salman_jag');
       $retval = mysql_query( $sql, $conn );
       
       
    echo "<select name=stepa>"; // list box select command
    
    foreach ($dbo->query($sql) as $row){//Array or records stored in $row
    
    echo "<option value=$row[field1]>$row[field1]</option>"; 
    
    /* Option values are added by looping through the array */ 
    
    }
    
     echo "</select>";// Closing of list box
    
    ?>
    
  8. Hello

    i am getting nothing printed on the page using this code, just a blank page is showing. Can any body help me out from this issue :

     

    <?php
    
    if (!ini_get("register_globals")) {
       import_request_variables('GPC');
    }
    //E?C?? ??I C?E? CEO E?
    $phpver = phpversion();
    if ($phpver < '4.1.0') {
       $_GET = $HTTP_GET_VARS;
       $_POST = $HTTP_POST_VARS;
       $_SERVER = $HTTP_SERVER_VARS;
    }
    $phpver = explode(".", $phpver);
    $phpver = "$phpver[0]$phpver[1]";
    if ($phpver >= 41) {
       $PHP_SELF = $_SERVER['PHP_SELF'];
    }
    
    class Pager
      {
       function getPagerData($numHits, $limit, $page)
       {
    	   $numHits  = (int) $numHits;
    	   $limit    = max((int) $limit, 1);
    	   $page	 = (int) $page;
    	   $numPages = ceil($numHits / $limit);
    	   $page = max($page, 1);
    	   $page = min($page, $numPages);
    	   $offset = ($page - 1) * $limit;
    	   $ret = new stdClass;
    	   $ret->offset   = $offset;
    	   $ret->limit    = $limit;
    	   $ret->numPages = $numPages;
    	   $ret->page	 = $page;
    	   return $ret;
       }
      }
    
    
       // get the pager input values
       $page = $_GET['page'];
       $limit = 50;
       $result = mysql_query("select count(*) from dada where category='Music'");
       $total = mysql_result($result, 0, 0);
       // work out the pager values
       $pager  = Pager::getPagerData($total, $limit, $page);
       $offset = $pager->offset;
       $limit  = $pager->limit;
       $page   = $pager->page;
       // use pager values to fetch data
       $query = "select * from dada order by id DESC category='Music' limit $offset, $limit";
       $result = mysql_query($query);
       $num=mysql_numrows($result);
    
    
    ?>
    <?php
    $i=0;
    while ($i<$num) {
    $id=mysql_result($result,$i,"id");
    $name=mysql_result($result,$i,"name");
    $image=mysql_result($result,$i,"image");
    $category=mysql_result($result,$i,"category");
    $linkdown=mysql_result($result,$i,"linkdown");
    $pubsite=mysql_result($result,$i,"pubsite");
    $description=mysql_result($result,$i,"description");
    $os=mysql_result($result,$i,"os");
    echo "<b><u><font size=\"4\">$name</font></u></b><br><font size=\"3\">$description</font><br><a href=\"$pubsite\" rel=\"nofollow\"><font color=\"#060d45\"><b>Publisher WebSite</b></font></a> <a href=\"$linkdown\" rel=\"nofollow\"><font color=\"#060d45\"><b>Download</b></font></a> <hr>";
    $i++ ;
    }
    ?>
    

    music.php

  9. Hello

     

    i am getting this error message, please help me to correct it :

     

    Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'table (id, name, description, linkdown, pubsite, category, image, os) VALUES ('' at line 1

     

     

    The code is as follows :

     

    <?php
    /// In order
    /// you
    /// information in this file:
    /// Copyright 2012
    /// All rights reserved.
    include("connect.php");
    $name = trim(mysql_real_escape_string($_POST["name"]));
    $description = trim(mysql_real_escape_string($_POST["description"]));
    $linkdown = trim(mysql_real_escape_string($_POST["linkdown"]));
    $pubsite = trim(mysql_real_escape_string($_POST["pubsite"]));
    $category = trim(mysql_real_escape_string($_POST["category"]));
    $image = trim(mysql_real_escape_string($_POST["image"]));
    $os = trim(mysql_real_escape_string($_POST["os"]));
    
    $results = mysql_query("INSERT INTO table (id, name, description, linkdown, pubsite, category, image, os)
    VALUES ('', '$name', '$description', '$linkdown', '$pubsite', '$category', '$image', '$os')");
    if($results) { echo "Successfully Added"; } else { die('Invalid query: '.mysql_error()); }
    ?>
    <a href="index.php">Back to index</a>
    

  10. I am using this sql to filter records :

     

    $query = "select * from mobileprices where range='5000'"

    but i am getting this error message :

    mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/dracra/public_html/a.com/range.php

     

    range field contains product prices range and filled with 5000, 10000, 15000, 20000 etc.

    I tried the following code to update the range values from numeric to text in phpmyadmin sql area :

     

    UPDATE mobileprices
    SET range='five'
    WHERE range='5000'

     

    but i am getting this error message :

     

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'range='five' WHERE range='5000'' at line 2

     

    I am confused as there are thousands of records and manually updating it one by one will take so much time.

    Anyone could help me out as how i can change numeric with text in range.

     

    or there is any way by that sql could accept this :

     

    $query = "select * from mobileprices where range='5000'"

     

    I need a solution, so please help me !!

  11. Hi

     

    i am getting sysntax error with the following code :

     

    <?php 
    
    
    echo "<embed flashvars="" src="http://www.salmobile.info/scrubber.swf?file=http://www.salmobile.info/sab/1/$player&bufferTime=3&previewImage=http://salmobile.info/sab/img1/$image&startAt=0&autoStart=false" allowfullscreen="true" type="application/x-shockwave-flash" id="FLVScrubber2" style="width: 323px; height: 283px;" />";
    
    
    ?>

     

    i am attaching the whole file. The error i am getting is

     

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/dracra/public_html/3gp-videos-download2.php on line 237

     

     

    plz help

     

     

     

    [attachment deleted by admin]

  12. hi

    i am getting syntax error in the following php code. Can any one help me in this regard.

     

     

    <?php
    
    echo "<script type=\"text/javascript\" src=\"http://funxy.com/sabaadmin/swfobject.js\"></script>
    
    
    
    
    <script type=\"text/javascript\">
    
    
    
    var s1 = new SWFObject("http://www.funxy.com/sabaadmin/flvplayer.swf","single","320","280","7");
    
    
    
    s1.addParam("allowfullscreen","true");
    
    
    
    s1.addVariable("file","$player");
    
    
    
    s1.addVariable("image","$image");
    
    
    
    s1.addVariable("width","320");
    
    
    
    s1.addVariable("height","280");
    
    
    
    s1.write("player1");
    
    
    
    </script>";
    
    ?>

  13. i want to change this code :

     

    $result = mysql_query("select count(*) from 3gp where category='Bollywood'");

     

    with this

     

    $result = mysql_query("select count(*) from 3gp where category='$category'");

     

    but i am getting error message "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/funxy/public_html/salmobile.info/3gp-videos.php on line 151". I am calling the page using http://abc.com/3gp-videos.php?category=Bollywood

     

    Please help.

     

     

    <?php
    
    
    $db="funxy_db";
    
    $conn = mysql_connect("localhost","funxy_saba","myasco001");
    @mysql_select_db($db) or die( "Unable to select database, Please contact your administrator");
    
    
    
    
    
    
    
    
    
    class Pager 
       { 
           function getPagerData($numHits, $limit, $page) 
           { 
               $numHits  = (int) $numHits; 
               $limit    = max((int) $limit, 1); 
               $page     = (int) $page; 
               $numPages = ceil($numHits / $limit); 
    
               $page = max($page, 1); 
               $page = min($page, $numPages); 
    
               $offset = ($page - 1) * $limit; 
    
               $ret = new stdClass; 
    
               $ret->offset   = $offset; 
               $ret->limit    = $limit; 
               $ret->numPages = $numPages; 
               $ret->page     = $page; 
    
               return $ret; 
           } 
       }  
    
    
    
        // get the pager input values 
        $page = $_GET['page']; 
        $limit = 3; 
        $result = mysql_query("select count(*) from 3gp where category='Bollywood'"); 
        $total = mysql_result($result, 0, 0); 
    
        // work out the pager values 
        $pager  = Pager::getPagerData($total, $limit, $page); 
        $offset = $pager->offset; 
        $limit  = $pager->limit; 
        $page   = $pager->page; 
    
        // use pager values to fetch data 
        $query = "select * from 3gp where category='Bollywood' order by id DESC limit $offset, $limit"; 
        $result = mysql_query($query); 
    
        // use $result here to output page content 
    
    
    //my addition
    
    //grab all the content
    
       //Custom Table Stsrt//
            $cols = 4; //number of coloms
            $i =1;
            echo "<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\" id=\"table1\" bordercolor=\"#FFFFFF\" bgcolor=\"#FFFFFF\">"
                 ."<tr>";
    
    while($r=mysql_fetch_array($result))
    {	
       //the format is $variable = $r["nameofmysqlcolumn"];
       //modify these to match your mysql table columns
      
       $id=$r["id"];
       $name=$r["name"];
       $views=$r["views"];
       $url=$r["url"];
       $image=$r["image"];
       $category=$r["category"];
      
       
       
       //display the row
       
       
       
       $mybox = "
       
       <br>
       <a href='http://salmobile.info/3gp-videos-download.php?id=$id' class=\"classd\"><b><u> $name</u></b></a>
       <BR>
       <span class=\"text\"><img src=\"$image\" width=\"60\" height=\"60\"></span>
       <BR>
       <span class=\"text2\">Download This 3GP Video</span>
       <br>";
    
    
                    if (is_int($i / $cols)){
                        echo "<td width='336' align='center' style=\"border-style: dotted; border-width: 0\">$mybox</td></tr><tr>";
                    }else{
                        echo "<td width='336' align='center' style=\"border-style: dotted; border-width: 0\">$mybox</td>";
                    }
                 if ( $i / $cols == 3) echo "<td colspan='3' align=\"center\">
    
    
    
    
    
    
    
    
    
    </td></tr><tr>";
    
    
    
    if ( $i / $cols ==  echo "<td colspan='3' align=\"left\">
    
    
    
    
    
    </td></tr><tr>";
    
    
                 $i++;
              //end if
           }//end while
           echo "</tr></table>";
           //Custom Table End//
       
    
    
    //ends my addition
    
    
    
        // output paging system (could also do it before we output the page content) 
        if ($page == 1) // this is the first page - there is no previous page 
            echo "<font color=\"#FFB300\">Previous</font>"; 
        else            // not the first page, link to the previous page 
            echo "<a href=\"http://salmobile.info/index-" . ($page - 1) . ".html\" id=\"navigationURL\"><font color=\"#FFB300\">Previous</font></a>"; 
    
        for ($i = 1; $i <= $pager->numPages; $i++) { 
            echo " <font color=\"#FFFFFF\">|</font> "; 
            if ($i == $pager->page) 
                echo "<font color=\"#FFB300\"> $i</font>"; 
            else 
                echo "<a href=\"http://salmobile.info/index-$i.html\" id=\"navigationURL\"> <font color=\"#FFB300\">$i</font></a>"; 
        } 
    
        if ($page == $pager->numPages) // this is the last page - there is no next page 
            echo "Next"; 
        else            // not the last page, link to the next page 
            echo "   <a href=\"http://salmobile.info/index-" . ($page + 1) . ".html\" id=\"navigationURL\"><font color=\"#FFB300\">Next</font></a>"; 
    ?>

  14. Ya i have defined the $name in the php file above the meta tag code.

    But i am still having the problem.

     

    Before the meta tag, i am successfully printing title code like this :

     

    <title><?php
       echo "$name 3gp Video";
    ?>, Katrina Kaif, mobile videos, 3gp mobile videos, emma watson videos, aishwarya rai videos, bollywood videos</title>
    

     

    But i am getting problem in meta tag.

  15. I am using this code to print variable value into meta tag :

     

    <META name="keywords" content="<?php echo "$name 3gp Video"; ?>, katrina kaif, mobile videos, 3gp mobile videos, emma watson videos, aishwarya rai videos, bollywood videos">

     

    But

    <?php echo "$name 3gp Video"; ?>

     

    is not printing the $name value. When i see the html source code of the web page, i only see this :

     

    <META name="keywords" content="katrina kaif, mobile videos, 3gp mobile videos, emma watson videos, aishwarya rai videos, bollywood videos">

     

    Anyone could help me how to make this code add up $name value into meta tag.

  16. Hi i was using the code below to display adsense ads between records, but when i changed number of column to 8 (because now i want to display records in 8 columns), that is, $cols = 1; //number of coloms , it all mess up like at this URL :

    http://salmobile.info/index.php

     

    Please help me how to correct this.

     

     //Custom Table Stsrt//
            $cols = 1; //number of coloms
            $i =1;
            echo "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\" id=\"table1\" bordercolor=\"#E2E2E2\" bgcolor=\"#E2E2E2\">"
                 ."<tr>";
    
    while($r=mysql_fetch_array($result))
    {	
       //the format is $variable = $r["nameofmysqlcolumn"];
       //modify these to match your mysql table columns
      
       $id=$r["id"];
       $name=$r["name"];
       $details=$r["details"];
       $url=$r["url"];
       $image=$r["image"];
       $mirririmg=$r["mirrorimg"];
      $mirror3gp=$r["mirror3gp"];
       
       
       //display the row
       
       
       
       $mybox = "
       
       <br>
       <a href='http://funxy.com/beta/3gp-download$id.html' class=\"classd\"><b><font-size=\"9px\"><u> $name</u></b></font></a>
       <BR>
       <span class=\"text\">     $details</span>
       <BR>
       <span class=\"text2\">     www.funxy.com/beta/3gp-download$id.html</span>
       <br>";
    
    
                    if (is_int($i / $cols)){
                        echo "<td width='336' align='left' style=\"border-style: dotted; border-width: 1\">$mybox</td></tr><tr>";
                    }else{
                        echo "<td width='336' align='left' style=\"border-style: dotted; border-width: 1\">$mybox</td>";
                    }
                 if ( $i / $cols == 3) echo "<td colspan='3' align=\"left\">
    
    
    
    <script type=\"text/javascript\"><!--
    google_ad_client = \"pub-8599219576830682\";
    /* funxy forex 336x280, created 4/3/09 */
    google_ad_slot = \"4524729891\";
    google_ad_width = 336;
    google_ad_height = 280;
    //--> 
    </script> 
    <script type=\"text/javascript\"
    src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"> 
    </script> 
    
    
    
    
    
    </td></tr><tr>";
    
    
    
    if ( $i / $cols ==  echo "<td colspan='3' align=\"left\">
    
    
    
    <script type=\"text/javascript\"><!--
    google_ad_client = \"pub-8599219576830682\";
    /* funxy forex 336x280, created 4/3/09 */
    google_ad_slot = \"4524729891\";
    google_ad_width = 336;
    google_ad_height = 280;
    //--> 
    </script> 
    <script type=\"text/javascript\"
    src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"> 
    </script> 
    
    </td></tr><tr>";
    
    
                 $i++;
              //end if
           }//end while
           echo "</tr></table>";
           //Custom Table End//
       
    
    
    //ends my addition
    
    
    
        // output paging system (could also do it before we output the page content) 
        if ($page == 1) // this is the first page - there is no previous page 
            echo "Previous"; 
        else            // not the first page, link to the previous page 
            echo "<a href=\"http://funxy.com/beta/3gp-videos-" . ($page - 1) . ".html\" id=\"navigationURL\">Previous</a>"; 
    
        for ($i = 1; $i <= $pager->numPages; $i++) { 
            echo " | "; 
            if ($i == $pager->page) 
                echo " $i"; 
            else 
                echo "<a href=\"http://funxy.com/beta/3gp-videos-$i.html\" id=\"navigationURL\"> $i</a>"; 
        } 
    
        if ($page == $pager->numPages) // this is the last page - there is no next page 
            echo "Next"; 
        else            // not the last page, link to the next page 
            echo "   <a href=\"http://funxy.com/beta/3gp-videos-" . ($page + 1) . ".html\" id=\"navigationURL\">Next</a>"; 
    ?>

     

  17. Hi

    i want to ad 336x280 adsense banner code after 2nd row and 6th row. Currently this ad code displays 30 records from mysql , one at a row. Please help

     

    <?php
    
    if (!ini_get("register_globals")) {
        import_request_variables('GPC');
    }
    //E?C?? ??I C?E? CEO E?
    $phpver = phpversion();
    if ($phpver < '4.1.0') {
        $_GET = $HTTP_GET_VARS;
        $_POST = $HTTP_POST_VARS;
        $_SERVER = $HTTP_SERVER_VARS;
    }
    $phpver = explode(".", $phpver);
    $phpver = "$phpver[0]$phpver[1]";
    if ($phpver >= 41) {
        $PHP_SELF = $_SERVER['PHP_SELF'];
    } 
    
    $db="hesla_xone";
    
    $c1 = mysql_connect("localhost","hesla_v2073","alpha123");
    @mysql_select_db($db) or die( "Unable to select database, Please contact your administrator");
    
    
    
    
    
    
    
    
    class Pager 
       { 
           function getPagerData($numHits, $limit, $page) 
           { 
               $numHits  = (int) $numHits; 
               $limit    = max((int) $limit, 1); 
               $page     = (int) $page; 
               $numPages = ceil($numHits / $limit); 
    
               $page = max($page, 1); 
               $page = min($page, $numPages); 
    
               $offset = ($page - 1) * $limit; 
    
               $ret = new stdClass; 
    
               $ret->offset   = $offset; 
               $ret->limit    = $limit; 
               $ret->numPages = $numPages; 
               $ret->page     = $page; 
    
               return $ret; 
           } 
       }  
    
    
    
        // get the pager input values 
        $page = $_GET['page']; 
        $limit = 30; 
        $result = mysql_query("select count(*) from sms where cat_id='$cat_id'"); 
        $total = mysql_result($result, 0, 0); 
    
        // work out the pager values 
        $pager  = Pager::getPagerData($total, $limit, $page); 
        $offset = $pager->offset; 
        $limit  = $pager->limit; 
        $page   = $pager->page; 
    
        // use pager values to fetch data 
        $query = "select * from sms where cat_id='$cat_id' order by id DESC limit $offset, $limit"; 
        $result = mysql_query($query); 
    
        // use $result here to output page content 
    //my addition
    
    //grab all the content
    while($r=mysql_fetch_array($result))
    {	
       //the format is $variable = $r["nameofmysqlcolumn"];
       //modify these to match your mysql table columns
      
       $id=$r["id"];
    $cat_id=$r["cat_id"];
       $name=$r["name"];
       $sms=$r["sms"];
    
    
          
       //display the row
       
       
       echo "<table border =\"2\" bordercolor=\"#C3C8CD\" cellspacing=\"8\" cellpadding=\"8\">";
    while ( $row = mysql_fetch_array($result)) {
    $bgcolor = $bgcolor == "#FADF00" ? "#4760A2" : "#4760A2";
    echo "<tr><td bgcolor=\"$bgcolor\">" . $row['sms'] . "</td></tr>";
    
              //end if
           }//end while
    
    echo "</table>";
    
    
    
    
       
    }
    
    
    
        // output paging system (could also do it before we output the page content) 
        if ($page == 1) // this is the first page - there is no previous page 
            echo "Previous"; 
        else            // not the first page, link to the previous page 
            echo "<a href=\"sms.php?cat_id=$cat_id&page=" . ($page - 1) . "\" id=\"navigationURL\">Previous</a>"; 
    
        for ($i = 1; $i <= $pager->numPages; $i++) { 
            echo " | "; 
            if ($i == $pager->page) 
                echo " $i"; 
            else 
                echo "<a href=\"sms.php?cat_id=$cat_id&page=$i\" id=\"navigationURL\"> $i</a>"; 
        } 
    
        if ($page == $pager->numPages) // this is the last page - there is no next page 
            echo "Next"; 
        else            // not the last page, link to the next page 
            echo "   <a href=\"sms.php?cat_id=$cat_id&page=" . ($page + 1) . "\" id=\"navigationURL\">Next</a>"; 
    
    mysql_close($c1);
    ?> 
    

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