Jump to content

sazzie

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sazzie's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi guys, can anyone please advice me how I can stop data from a webpage form submitting each time I refresh the webpage?
  2. Firstly, I upload images via a simple form uploading facility. The image's byte data is then saved to mysql in a BLOB field. Secondly, I try reading that information back and reconstituing the image for displaying on my webpage(s). I need help with this process as I don't know where I am going wrong. This is the function used to load the blob into mysql : function test(){ if( move_uploaded_file($_FILES['image']['tmp_name'],"management/test/".$_FILES['image']['name']) ){ echo "<br> File move sucessful!"; echo "<br> File Size : ".filesize("management/test/".$_FILES['image']['name'])."<br>"; }else{ echo "<br> File move Failed!"; } $instr = fopen( "management/test/".$_FILES['image']['name'],"rb" ); $data = addslashes(fread($instr,filesize("management/test/".$_FILES['image']['name']))); echo "<br> ".$data; if( !(mysql_query("insert into gallery (title, ext, data) values ('test', 'jpeg', \"".$data."\")") ) ) { echo "<br> We Have A Problem!"; } } And this is the code to display the image : function test2(){ $rs = $this->adodb->execute("SELECT * FROM gallery"); while( $obj = $rs->FetchRow() ) { /*echo "<br> title : ".$obj['title']; echo "<br> ext : ".$obj['ext']; echo "<br> time : ".$obj['image_time']; echo "<br> String lenght : ".strlen($obj['data']); echo "<br> data : ".$obj['data']; echo "<br> ************************************* ";*/ // outputing HTTP headers // header('Content-Length: '.strlen($obj['data'])); header("Content-type: image/".$obj['ext']); // outputing image // echo "<br> checking image output : ".$obj['data']; print( $obj['data'] ); } } When I try executing test2(), All I get is the first couple of byte code characters and nothing else.
  3. Hi, I am developing web pages for mobile phones and I can not get my php scripts to execute on my nokia emulator. It has worked before but I had to uninstall and reintall apache. I put in the necessary addtype but it no longer co-operates. I use WAMP 5 which is constituted by PHP 5.0.4 , Apache 1.3.33 and MySQL 4.1.7 My simple scripts I am trying to execute on my mobile emulator. One script calls the other via a form submit button. <?php header('Content-Type: text/html'); ?> <html> <head> <title> Next Page </title> </head> <body> Interface.php is active! - inside HERE? <form method = "post" action="process.php"> <input type = "submit"/> </form> <?php ?> </body> </html> <?php echo"Process.php is responding!"; ?> Below is my addtype modification from the httpd.conf file. AddType application/x-tar .tgz AddType application/x-httpd-php .php .html .htm AddType application/x-httpd-php .php3 AddType application/x-httpd-php .phtml I know this works as I had it working before. Can someone please help me.
  4. I know my query is based on mobile applications but bear with me please while I explain. My apache installation has got an addtype instruction to deal with php and html through the php parser. This all works fine in Internet Explorer but my mobile phone emulator doesn't even display basic html servered through the apache server. I use the localhost address to display my simply webpage. IE responds positively but the mobile emulator just says "response unknown". Can anyone tell me is there are instructions to get apache to recognise other client types? All I'm serving through apache is the following: <html> <head> <title> Test Page </title> </head> <body> Testing This Output! </body> </html> Please help.
  5. Can someone please tell me how to get Apache to pass html, with or without embedded php code, through the php preprocessor before sending the output to a webbrowser?
  6. I have began using Apache to serve my web pages instead of tomcat. In Internet explorer my webpage loads just fine and then my test form calls and loads my test php script sucessfully. My problrm now is, whilst I can get my Nokia 6230i emulator to load my webpage, the php script tries to download instead of actually producing output. I don't really know what is wrong .... perhaps it's a mime-type issue perhaps not. Can anyone shed some light on this, thanks.
  7. Does anyone know if the Eclipse IDE has an apache server plugin?
  8. Hi, does any one know how to connect tomcat with apache using mod_jk on a windows platform? I am trying to serve php script through tomcat. Quite desperate
  9. Hi, I am working on a xhtml project on a tomcat server. In order for my webpages to be servered dynamically through php I am trying to get tomcat and apache to work together - I am informed it is commonly done hence the name "apache tomcat". Can someone please direct me in how to go about getting tomcat and apache to interconnect for the purpose of tomcat serving php through apache? I just downloaded Tomcat Connectors 1.2.21 but I have found no tutorials which tell me how to use it. I have WAMP5 and jakarta-tomcat-4.1.31-LE-jdk14. Any help is much appreciated.
  10. Hi, please bear with me as I am inexperienced in this. I am assuming Tomcat and apache are one and the same because of the "apacheTomcat" naming convention. Can someone please advice me on how to set my tomcat server to recognise php? When I try to call a php script when I submit a form in my xhtml file, my browsers attempt to download the script. I really could use some help here, thanks.
  11. sazzie

    xhtml problem

    I spoke too soon. This piece of code made no difference. Can you offer anyother potential solutions? Anyone?
  12. sazzie

    xhtml problem

    Thank you very much for that. I am at work presently so I haven't had a chance to try your recommendation out but I have a feeling it's right because I have no idea about php settings I try and keep you posted - if it works or not. Thanks
  13. sazzie

    xhtml problem

    <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Hello world. Welcome to our mobile Calendar test interface</title> </head> <body> <p>Select Date</p> <form action="phpTest.php" method="post"> <select> <option>Milk</option> <option>Coffee</option> <option>Tea</option> </select> <input type="submit" value="ENGAGE"> </form> <hr /> </body> </html> <?php echo "Interface.php is active!"; ?> I am trying to get the above code to work. Both on my mobile phone emulator and standard web browser(IE), instead of obtaining output from the php script it tries to download the script. Can someone please offer some help? ???
  14. I am trying to get me eclipse installation to work with a phpeclipse manual installation. I have put the extracted files in every conceivable place under my eclipse directory but I can not get eclipse to recognise my php code. I found the following on the net: "Unzip the *.zip file into your eclipse install directory (Note: the /plugins and /features directories in the *.zip file should be in sync with the eclipse /plugins and /features directories)" It seems pretty staight forward but can anyone advice me on what "sync" means and any general eclipse plugin manual installation techniques? Thank you.
  15. Do you have sample code for the browser user agent?
×
×
  • 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.