Jump to content

Q695

Members
  • Posts

    783
  • Joined

  • Last visited

Posts posted by Q695

  1.  How can I write the HTML, not have an sql escape error, and do the insert?

    <?php
    $img_src = ob_get_contents(); //25x25 html table of images being written by about 30 lines of PHP
    $sql_map_img="INSERT INTO map_image
    (`user`, `map_id`, `map_img`)
    VALUES ('$id', NULL, `$img_src`);";
    //echo $sql_map_img;
    $result_creature = mysql_query($sql_map_img, $con) or die ("can not generate result " . mysql_error());
    ?>
    
  2. The images are like transparencies (not actually transparencies), but electronic images being put into a file.  I to put the output in a file electronically, just have the user click a submit button that will make an image of the output.

     

    This is what I have:

    <?php
    $filename = 'image.jpg';
     header('Content-Disposition: inline; filename="'.$filename.'"');
     header("Content-Type: image/png");
    
     // Don't forget the Content-Type as well...
     // Output image here
    
    /*
    header("Content-Type: image/png");
    header('Content-Disposition: inline; filename="some.png"');
    //*/
    ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    	<head>
    		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
    		<meta name="generator" content="Adobe GoLive" />
    		<title>Untitled Page</title>
    	</head>
    
    	<body>
    <?php
    $id='1';
    $img_fldr='../';
    if (isset($_GET['map']) && $_GET['map']!='' && isset($id) && $id!=''){
    include "../connection.php";//the database connection off the main application
    include "../design.php";//the object I want to have a screen shot of behind the scenes
    }
    ?>
    	</body>
    
    </html>
    

    The URL being pulled is: http://localhost/fall_axe/builder/map_render.php?map=1

     

    error: it says there are errors, but when without the header info it works just fine.

  3. You can use the GD library to copy a load of smaller images into a larger image and then save the large image. If that is what you mean?

    How?

     

    Is there an easy way to take it from HTML, and make it a PHP, if it's already in a table form (think of how overhead projectors used to be able to convert print on paper onto a clear film I want the clear film copies).

  4. Do you want to create an image of what the rendered page would look like in the browser? For that you'd either need a app that can render HTML to an image or you'd have to install a browser and some screen-capture software on the server to load the page and snap the picture.

    Exactly, but like a button press cronjob.  I have a page that is written just to do the image output in HTML, but now I want to have it converted to an image.

  5. $strHtmlOutput.= '
       
    <tbody>
    <tr>                                  
                   $strHtmlOutput.= '<tr>                                  
                                <th>Date of Request</th>
                                <td>
    '.$result['cdate'].'
                                </td>
                              </tr>
                             ';
      
      $strHtmlOutput.= '<tr>                                  
                                <th>Date Last Modified</th>
                                <td>
    '.$result['mdate'].'
                                </td>
                              </tr>
                             ';                                     
        }
        
        $strHtmlOutput.='</tbody>
    </table>';

     

    missing a single '

    $strHtmlOutput.= '
       
    <tbody>
    <tr>';                                  
                   $strHtmlOutput.= '<tr>                                  
                                <th>Date of Request</th>
                                <td>
    '.$result['cdate'].'
                                </td>
                              </tr>
                             ';
      
      $strHtmlOutput.= '<tr>                                  
                                <th>Date Last Modified</th>
                                <td>
    '.$result['mdate'].'
                                </td>
                              </tr>
                             ';                                     
        }
        
        $strHtmlOutput.='</tbody>
    </table>';
    
×
×
  • 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.