Jump to content

hamza

Members
  • Posts

    321
  • Joined

  • Last visited

Posts posted by hamza

  1. <a href="<?php "menu.php?id=". $_GET['id']. "".'&register='. $_GET['register'] ?>">

     

    When I click on this link then it won't take me to menu.php I don't know what could be going wrong with the way it is script it.

     

    help

     

    make something like this

    <a href="<?= "menu.php?id=". $_GET['id']. "".'&register='. $_GET['register'] ?>">

     

    now it will show the string and get values.

     

  2. Because variables do get passed between pages. You'll want to use include instead.

    Actually iframe allowing me to scrolling on my template if i do not use iframe then it will

    not scroll down.so its necessory to use .

    If you use iframe then any variables you define will not be available to a.php

     

    You don't have to use iframes to allow for scrolling. You should look into the overflow CSS property. Example

     

    <div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div><div style="width: 200px; height: 100px; overflow:auto">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum scelerisque quam vel neque tempus nec bibendum urna egestas. Vivamus at egestas mauris. Vestibulum euismod ante at nunc fermentum fermentum. Fusce dictum, diam vel convallis imperdiet, eros turpis venenatis mi, rutrum pharetra nisl nisi non odio.</div>

     

     

    Actually i have got blog template in which iframe tag is used.and in that iframe tag a.htm i calling

    and i have change a.htm to a.php i must need to call the a.php file so i can run my code properly.

    if you know or can remove iframe from template and make it simple then plz .may i send u my template.

    its being kind of you if u help me.

     

  3. i have got the main problem theme

    here is the code

    <?php  $apple = '12$'; ?>

    <iframe id="rf" src="template_files/a.php" allowtransparency="true" class="templatedemo" frameborder="0" scrolling="auto"></iframe>

     

    a.php file

    contain

    <?php echo $apple;  ?>

     

    the main problem is that $apple variable not displaying the value.

    plz tell me why it is not show value.

     

  4. did u tried to access template_files/a.php

    with a normal browser (without iframe, or frame)

     

    yeah with fire fox and IE i had tried  <?php  include "template_files/a.php"; ?>

    and with require as well.

     

    nothing happening

    plz help

  5. How do you put in multiple $_GET 's? But they're not from a form or anything, just by clicking on links...

    So say you first select an album, the phpfile url gets: .php?album=choice

    Then, If you select a way of order of the pictures, the url goes: .php?sort=choice

     

    I need to get both of them in the URL, so I need to get .php?album=choice&sort=choice

    How do I reach this? Can you do this without a form like

    <form action="welcome.php" method="get">
    Name: <input type="text" name="fname" />
    Age: <input type="text" name="age" />
    <input type="submit" />
    </form>

    ?

     

     

    Possibilites

    using form

    <form action="mypage .php?album=choice&sort=choice" method="get">

     

    usign link

    <a href='mypage.php?album=choice&sort=choice'>

     

    or best way to do this in form

    <hidden name=sort value=choice>

    <hidden name=album value=choice>

     

     

    i dont thing there is any other way to do this

  6. i have iframe like

    <iframe id="rf" src="template_files/a.php" allowtransparency="true" class="templatedemo" frameborder="0" scrolling="auto"></iframe>

     

    problem is that

    when i include a.php in src it show nothing if i include a.htm then it show properly contents of a file.

     

    i want to include the a.php file which is not including

    please help me

    thanks in advance

  7. Maximum Profit Problem

     

    Write a function, with a array as a parameter, representing the monthly price of a certain good over a period of time. eg:

     

        Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec

    {45, 38, 50, 48, 55, 64, 50, 30, 40, 42, 39, 52}

     

    If you can buy and sell only once in the given period of time, find out the maximum possible profit  you can make, i.e.:

     

    • Buy on Feb and sell on Mar you will make a profit of 50 - 38 = 12

    • Buy on Apr and sell on Jun you will make a profit of 64 - 48 = 16

     

     

    its not a homework keep in mind.

     

  8.  

    this is how i am assigning file list.php contents in content variable to include in main template

            $arr = array(1000, 1001, 1002);
    $smarty->assign('myArray', $arr);
    $smarty->assign('pageTitle', 'Admin Control Panel - View Categories bhai jan');
    $smarty->assign('content', 'list.php');//'list.php'
    

     

    list.php file code is below

    {* simple loop to display integers *}
    {foreach from=$myArray item='foo'}
    {$foo}
    {/foreach}

     

     

     

    including file dynamically using content variable

               <div id="main">
                
                 {include_php file="$content"}
                 
                </div>
    
    

     

    Problem is that when file is include with contents of smarty

    but not running it .

     

    output is look like follow the link below

    http://76.163.166.217/hamza/phpblog/phpblog/admin/catagory/

     

    all paths are included perfectly

  9. RewriteEngine On
    RewriteBase   /the_directory
    
    RewriteRule  ^(.*).html$ $1.php [R=301]
    

     

    above is my code which will change the extension from html to php.

     

    my dir structure is

    c:\appserv\www\myfile.html

     

    and same form .htaccess

    when i load the myfile.html

     

    it is not runing as i am expecting?

    plz help me

     

     

  10. ACTUALLY I WANT TO SHOW  PAGE CONTENTS

    THAT ARE FETCHING FROM DATABASE TABLE

    AND THAT CONTENTS CONTAIL PHP +HTML CODE.

    IF I ECHO THE CONTENTS THEN PHP CODE IS ALSO

    ECHOED TO THE BROWSER

    PLEASE GIVE ME ANY SOLUTION FOR IT MY CODE IS SHOWN BELOW.

     

     

    PAGE PRESENT IN TABLE

    
    <div id="page_contents">	
    <table border="0" width="100%" cellspacing="1" cellpadding="3" class="white"> 
    <?php 
    $sql = "SELECT * FROM ".$dbtables['tab_1'];
    $result = $db->query(getPagingQuery($sql,FAQ_PP)); 
    $count = 1;
    while($row = $db->fetchNextObject($result)) {
        if ( $count%2 ) {
    	$class = "admin_white";
    } else {
        $class = "admin_gray";
    }
    ?>
      <tr>
        <th width="413" class="admin_white" align="left"><strong><em><?=$row->question;?></em></strong></td> </tr>
      <tr>
        <td class="<?=$class?>" width="413" align="left"><?php echo $row->answer; ?></td>
      </tr>
      <?php
      $count++;
    } 
    ?>
      <tr>  
        <td align="center"><?php echo getPagingLink($sql,FAQ_PP, $strGet = ''); ?></td>
      </tr>
        <tr>  
        <td colspan="4" align="center"> </td>
      </tr>
    </table>
    </div>   	  
    <hr>
    <p> </p>
    

     

    HOW I AM FETCHING IS SHOW BELOW

    <div id="content">
    <?php        
           	 echo $contents; 
    ?>	
    </div>
    
    

     

     

    PROBLEM IS WHEN I FETCH THE PAGE CODE THEN I SHOW ME

    PHP CODE + HTML AS WELL .

    BUT I AM EXPECTING HTML ONLYN.

     

     

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