Jump to content

InO

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

InO's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. any ideas why i can't output an image?
  2. thanks for the reply, with the header and the revised code <?php header("Content-Type: image/jpeg"); $file = "new-additions/test.jpg"; $im = ImageCreateFromJPEG($file); imagejpeg($im); ?> i just get this in the browser http://127.0.0.1:81/mytest/untitled/TMPgzo19l6tka.php
  3. ok i know this is a noob question but how do i open an image file? i've tried several things and all i get is a blank screen! here's my current experimentation <?php $file = "new-additions/test.jpg"; $im = ImageCreateFromJPEG("new-additions/test.jpg"); ImageJpeg($im,$file); ?> I'm using the GD library and all i need to do is open the file and it's down hill from there
  4. i get Fatal error: Call to undefined function mysql_connect() because php can't find the extension. i've added libmysql.dll to my system path, i've uncommented extension=php_mysql.dll in php.ini, i've changed extension_dir from "./" , to "c:\Program Files\Apache Software Foundation\Apache2.2\ext", which is where php_mysql.dll , i didn't install it php in the C folder. i'm running a WAMP setup with windows xp. i'm just trying to get php to load the extension. thanks in advance
  5. found out what the problem is. thanks for all the help. for one i was changing the display_errors in the php.ini in the wrong place i.e the description, also my version doesn't seem to have mysql support so i was getting Fatal error: Call to undefined function mysql_connect(). guess i'm going to have to reinstall.
  6. when i view the source code i get this <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body>
  7. <?php $connection = mysql_connect("http://www.hotmail.com","","") or die ("couldn't connect to server"); $db = mysql_select_db("socialtemp",$connection) or die ("couldn't select database"); $query = "Select * FROM users"; $result = mysql_query($query) or die("query failed :" . mysql_error()); echo "<TABLE BORDER='1'>"; echo "<TR>"; echo"<TH>Name</TH><TH>Number</TH>"; echo "</TR>"; while ($row = mysql_fetch_array($result)){ echo "<TR>"; echo "<TD>", $row['name'], "</TD><TD>", $row['number'],"</TD>"; echo "</TR>"; echo "hello"; } echo "</TABLE>"; //echo "hello"; //mysql_close($connection); ?>
  8. reply also i changed $connection in the last example. i was just trying to get it to return something.
  9. thanks for the responses, i changed mysqli but i have another problem as well. my php.ini is set to display errors off and i've been trying to change the setting, i've restarted apache, looked for multiple files and everything. this is why i can't get any errors returned. also what do you mean be by code tags, html tags? let me know and i'll do it. this is entire script <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $connection = mysql_connect("http://www.hotmail.com","","") or die ("couldn't connect to server"); $db = mysql_select_db("socialtemp",$connection) or die ("couldn't select database"); $query = "Select * FROM users"; $result = mysql_query($query) or die("query failed :" . mysql_error()); echo "<TABLE BORDER='1'>"; echo "<TR>"; echo"<TH>Name</TH><TH>Number</TH>"; echo "</TR>"; while ($row = mysql_fetch_array($result)){ echo "<TR>"; echo "<TD>", $row['name'], "</TD><TD>", $row['number'],"</TD>"; echo "</TR>"; echo "hello"; } echo "</TABLE>"; //echo "hello"; mysql_close($connection); ?> </body> </html> when i view the source code in the browser i get this <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body>
  10. let me explain. here is my code <?php $connection = mysql_connect("localhost","root","thetrap") or die ("couldn't connect to server"); $db = mysql_select_db("socialtemp",$connection) or die ("couldn't select database"); $query = "Select * FROM users"; $result = mysqli_query($query) or die("query failed :" . mysql_error()); echo "<TABLE BORDER='1'>"; echo "<TR>"; echo"<TH>Name</TH><TH>Number</TH>"; echo "</TR>"; while ($row = mysql_fetch_array($result)){ echo "<TR>"; echo "<TD>", $row['name'], "</TD><TD>", $row['number'],"</TD>"; echo "</TR>"; } echo "</TABLE>"; echo "hello"; mysql_close($connection); ?> the script will not return anything. no errors, nothing. however if i just write echo "working" working will display in the browser. I'm wondering if it's my configuration something in the code i don't know. Any help would be greatly appreciated. thanks
  11. i have apache and iis running on the same computer and i use port 81 to access my apache files. when i point to the test.php file it works however if i try to open any php files that i have created, it doesn't read the php code blocks. any ideas? thank you in advance
×
×
  • 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.