Jump to content

slashemail

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

slashemail's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. A simple solution to your problem would be. 1. Just pass the values through the pages using hidden variables. or 2.Maintain a session variable which will update the variable on every visit to the page. Happy Hacking:)
  2. I would suggest you a combination of functions like [code] htmlspecialchars strip_tags stripslashes mysql_escape_string        #For inserting into the database(Mysql) [/code] Hope this helps
  3. Some more infomation would help everyone to help you. the link would be even better
  4. This is how your code should look. I have rewritten few top lines of your code. [code] <? #initialise variable $temp_flag   = FALSE; if ((isset($_POST['submit']) && $_POST['submit'] == "Submit")) {     #your PHP code here to insert into the database          #After inerting the values set the flag to true     $temp_flag  = TRUE; } ?> <html> <head> <title></title> </head> <body> <form method="post" action="<? echo $_SERVER[PHP_SELF]; ?>"> <td colspan="4" valign="top"><table width="770" border="1" cellspacing="0" cellpadding="1"> <table width="770" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <tr align="center" bgcolor="#52A6CE"> </tr> <td width="770"> <? #check if the flag is set, IF yes then display the message(dont write an else part) if (isset($temp_flag) && $temp_flag == TRUE) {     print ("<center>Added sucessfully</center>"); } ?> <table width="90%" border="0" align="center" bgcolor="#F0FAFD" cellpadding="3" cellspacing="0" class="descf" style="border:1px solid #9FD2EC"> <tr valign="middle"> [/code] Hope this helps
  5. certailny tour query is wrong at this point --> INSERT INTO test (first_name, last_name, department, dob) VALUES ('') The query should have the values entered or left blank atleast. The right query would be INSERT INTO test (first_name, last_name, department, dob) VALUES ('','','',''); Just note that when you explicitly mention the parameters of the insert statement, then you should mention the corresponding values also. Please refer to th mysql manual & have a look at the insert SYNTAX.
  6. Use something like echo substr($string_to_trim, 0, 24); // Displays the first 24 characters. Hope this helps.....
  7. Firstly I would suggest you not to use registered globals. A better solution for your problem would be [code] if (isset($_POST['submit']) && $_POST['submit'] == "Submit")) {     //Run the insert Query     //You can add some ideas fo your own to display the relevan messages after insertion. } #Forget the else part. #Let the form be displayed by default [/code] This is very bad on your part Check your line # 8 which says <form method=\"post\" action=\"$_SERVER[PHP_SELF]\"> well it should be <form method="post" action="<? echo $_SERVER[PHP_SELF]; ?>"> Note: You have not enclosed the PHP variables in PHP tags. Check it out ..... Let me know if it works after the change
  8. By formatting i mean "Justifying a mail" e.g name city Number xxxxxx xxx xxxxxx xxxxxx xxx xxxxxx xxxxxx xxx xxxxxx xxxxxx xxx xxxxxx xxxxxx xxx xxxxxx xxxxxx xxx xxxxxx This is what i mean by indentation. Any solutions??
  9. Firstly thanks for the reply. I agree with you.But i want the mail t be sent as plain text [b]only[/b].Its a requirement and i cant say No. So i have to work a way around this problem of formatting plain text emails. Comments appericiated.
  10. Just check if magic_quotes_gpc is set On.(For that matter compare the local PHP settings with ther server settings). Sometimes magic_quotes create a hell lot of problems.
  11. Just go throuh your phpinfo page & check if you have GD support. My first target is GD Library. Confirm this first. The errors like 'Division by zero" on lines 2389, 2396, etc are pretty simple, Always check for a non-zero value before using the Division operator.
  12. Images can be easily resized a uploaded using PHP.
  13. One clear cut solution would be. Get the size of the array, Loop through the aray and replace each instance in the array. [code] for ($i=0;$i<sizeof($array1);$i++) {   if ($array1[$i] == "What ever")       #strcmp could also be used     {        $array1[$i] = "";    #Use any value      } } [/code] You can use your own logic to read the array & replace the occurences found within. Hope this will puts some light.
  14. It would be better if you could show the code snippet(upload script) which is responsible for the error. Note : Check if GD library is installed on the server.
  15. Hello, I am using [b]phpmailer[/b] to send mail from a Win2k3 server. Messages sent as plain text gets garbled(Indentation is lost) when i view them in Outlook. Is it a PHP(i bet not), Outlook, phpmailer,(any other) problem. Please suggest me a solution as how to indent mail(plain text). P.S:I dont want to send the mail as HTML.I want to format the mail as plain text. Awaiting Comments....... Thanks.
×
×
  • 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.