Jump to content

kumarrana

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

kumarrana's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am looking for some ideas or links to read online materials. I need help on formatting such as auto-link for www, auto-mailto for email@dot.com. Moreover I just finish writing blog but any contents posted by user can't be appeared as they typed (Like paragraph, alignment, and so on). I was thinking about writing config file and "include" on all PHP files but I just don't have any idea on how to create a config file that do all what I just explained.
  2. Thanks, Darak and Dw for the idea.
  3. It is kidda stupid to ask. I used a hard coded time format "July 04, 2007" stored on MySQL. Now I want to display a message a week from that date. Anybody know any easy solution.
  4. Thanks Kevin7 for the link. I will check it out.
  5. Can somebody tell me how to extract certain length of the string, echo it and link it to different page? For Sentence like " This is the PHP blog". I only want to display "This is the ..." and link it to different page.
  6. Even knowing that, I could not avoid the header problem. Instead I used echo "<meta http-equiv = \"refresh\" content = \"1; URL=test.php\">"; Can that be alternative solution? In past I had problem setting session once page is refreshed which I could not debug. I have login.php page included on index.php page. login.php will only appear if session is not set. My login.php page resides in <div></div>. Please somebody help me to get out this pain. btw I tried flush()
  7. What do you mean by stickied post? Can you give the link
  8. I am well aware of the error I have been getting but I just can't fix it. Error is Warning: Cannot modify header information - headers already sent by (output started at ..................index.php:18) in ........................login.php on line 28.Can anybody find bugs on it here is the login.php file included on index.php page <?php require_once('mysql_login.php'); session_start(); $errorMessage = ''; if(isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) { // check if the username and password combination is correct $userpass = md5($_POST['txtPassword']); $username = $_POST['txtUserId']; $result = mysql_query("SELECT * FROM user WHERE password='$userpass' AND username='$username'") or die("Couldn't query the user-database."); $row_user = mysql_fetch_array($result); $num = mysql_result($result, 0); if(!$num) { $errorMessage = 'Sorry, wrong username / password'; } else { $_SESSION['autheticate'] = true; $_SESSION['identification'] = $row_user['identification']; $_SESSION['admin'] = $row_user['admin']; // after login we move to the main page header('Location: ../index.php'); exit; } } ?> and my index page look like this <?php session_start(); if(isset($_SESSION['autheticate'])) { $identification = $_SESSION['identification']; $admin = $_SESSION['admin']; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Title</title> <link rel="stylesheet" href="includes/style.css" type="text/css" /></head> <body> <?php include("header.htm"); echo "<div class = \" verticalmenu \" >"; if(!isset($_SESSION['autheticate'])) { include("includes/login.php"); //echo "<a href = includes/logout.php> Logout </a>"; } else { include("includes/logout.php"); } echo "</div>"; ?> </body> </html> Can anybody tell me what am I doing wrong?
  9. I see. Got it. Another problem was it was creating multiple file extension while uploading the file. I fixed both. Thanks bunch for you help.
  10. I think I got it. I think there is something to do with file extension when it uploads the file and writes name into database. Let me try that first. I will let you know.
  11. Not Found The requested URL /blogRedesign/file_upload/ResumeOne.doc was not found on this server.
  12. Nop, Does not work? Thanks
  13. It is such a stupid questions that I can't fix link problem in my PHP script. Code looks lie this $attached_file = $result_row['attachment']; // Access uploaded file name from database echo "<br><a href=file_upload/$attached_file> Attachment</a>"; //Link to the file, file_upload is folder where file is uploaded Can body find glitch in it?
  14. Thaks a bunch. I think I am ganna stick with your code.
×
×
  • 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.