Jump to content

fm1

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

fm1's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. fm1

    php error

    been strugling,how do i sort it out
  2. fm1

    php error

    what does this mean Warning: include(4darkm.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\mysite\Images\includes\template.php(101) : eval()'d code on line 99 Warning: include() [function.include]: Failed opening '4darkm.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\mysite\Images\includes\template.php(101) : eval()'d code on line 99
  3. what do you mean, if you dont understand my question, then how do you build a website, using php only or does it have to be compiled in html
  4. hi guys,im a bit new to php can you create a full website using just php,for instance, is a php website just php code. or does the website compile of html and added php to give it some features. reason im asking is because i cant find any tutorials on how to make a full php website. should you code the site in html then add php to it
  5. same result, please correct me, but doesnt the image.php file work as a css file, because i can see the image, if i view it in view.php another Q. how do I view the data inside my tables in my database, the image gets written to the database if im not mitake, whats the syntax to see if it was loaded in the database. if you dont cum rite,thanks anyway for helping
  6. actually i do, when i view my "view.php" file with code <html> <body> .. <img src="image.php?img=1" border="0" alt="" /> .. </body> </html> i see the pic, but when i open the image.php script in browser i get that error,dont know why
  7. heres my code <? $dbcnx = mysql_connect("localhost", "fawaaz", "honda"); mysql_select_db("base64imgdb"); $img = $_REQUEST["img"]; $result = mysql_query("SELECT * FROM images WHERE imgid=" . $img . ""); if (!$result) { echo("<b>Error performing query: " . mysql_error() . "</b>"); exit(); } while ($row = mysql_fetch_array($result) ) { $imgid = $row["imgid"]; $encodeddata = $row["sixfourdata"]; } mysql_close($dbcnx); echo base64_decode($encodeddata); ?> and my error Error performing 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 '' at line 1 is this a general error, or what am i doing wrong here
  8. fm1

    PHP Shoutbox

    Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the webmaster. Error 404 localhost 01/23/08 16:07:42 Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.4
  9. Heres my code <? //the host, name, and password for your mysql mysql_connect("localhost","fawaaz","honda"); //select the database mysql_select_db("news"); if($submit) { //use the PHP date function for the time $time=date("h:ia d/j/y"); // inserting it into the shoutbox table which we made in the mysql statements before $result=MYSQL_QUERY("INSERT INTO shoutbox (id,name,message,time)". "VALUES ('NULL','$name', '$message','$time')"); } ?> <? //returning the last 5 messages $result = mysql_query("select * from shoutbox order by id desc limit 5"); //the while loop while($r=mysql_fetch_array($result)) { //getting each variable from the table $time=$r["time"]; $id=$r["id"]; $message=$r["message"]; $name=$r["name"]; ?> <? echo $time ?><br> <? echo $name ?><br> <? echo $message ?><br> <? } ?> <form action="<? echo $php_self ?>" method="post"> <INPUT TYPE='TEXT' value='name' NAME='name' SIZE=30 maxlength='100'><br> <INPUT TYPE='TEXT' value='message' NAME='message' SIZE=30 maxlength='100'> <input type="submit" name="submit" value="submit"> </form> my problem, create database already, when opening script in browser opens fine, but as soon as you fill in the name and comment and press submit,it returns back to the previous page,(like it refreshes),no data is displayed and no data is recorded in mysql
  10. thanks well I guese im sorted now thanks to you.are you perhaps on msn messenger,gmail or skype, how much years exp you got, i got about only +4months exp,need to learn more
  11. thanks, both home.php and about.php are working how do i add a link to home.php to link about.php to home. so that when I open home.php then there a link to about.php
  12. functions.php still blank about.php Fatal error: Call to undefined function display_header() in C:\xampp\htdocs\test3\about.php on line 2 dont you think theres an error maybe in my home.php file. please note, i only have 3 scripts home.php about.php functions.php heres my home.php <html> <head> <title>My Title</title> <style type="text/css"> body{ background-color: black; color: white; } </style> </head> <body> <h1>Page Title</h1> <p>Page content goes here...</p> <p>Copyright 2007 Company Name</p> </html> the other 2scripts are changed to the ones you gave me now
  13. about.php now comes up with a black screen in browser, no text functions.php is still white in browser. and home.php has text but no links to the other pages
  14. Hi guys,im trying to create a php template. heres what i done 3 pages page 1 : home.php <html> <head> <title>My Title</title> <style type="text/css"> body{ background-color: black; color: white; } </style> </head> <body> <h1>Page Title</h1> <p>Page content goes here...</p> <p>Copyright 2007 Company Name</p> </html> page opens in browser but has no links to any other pages like my about .php page then page 2: functions.php <?php function display_header($title){ ?> <html> <head> <title><?php echo $title; ?></title> <style type="text/css"> body{ background-color: black; color: white; } <style> </head> <body> <h1><?php echo $title; ?></h1> <?php } function display_footer(){ ?> <p>Copyright 2007 Company Name</p> </html> <?php } ?> nothing just blank white comes out in the browser, dont know why then page 3: about.php <?php include('functions.php'); display_header('About Company Name'); ?> <p>This is the content for the about page...</p> <?php display_footer(); ?> function display_footer(){ ?> <p>Copyright <?php echo date('Y'); ?> Company Name</p> <html> <?php } ?> Parse error: syntax error, unexpected '}' in C:\xampp\htdocs\test3\about.php on line 14 please help, or is there any other easier way to create a std php web template
×
×
  • 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.