Jump to content

mistakes!

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mistakes!'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hello thks alot for all your help i was able to solve the problem...one last question on registration the code is meant to send an auto email to the registrant and it is not doing that. where have i gone wrong? $queryq = "insert into registrant values ('$flag','$firstname','$lastname','$dateofbirth','$email','$password','$companyname','$street','$country','$phone','$fax','$area')"; $resultq = mysql_query($queryq) or die("Error with the query. Message: ".mysql_error()); print mysql_error(); $sub="Registration"; $message="You have been registered has an author with id $flag"; mail($email,$sub,$message,'From : admin'); echo ' You have been sign-up successfully ';
  2. hello i am trying to write a registration code but when i feel in the form i get this message Your email entry already exists..so please register again. $queryq = "insert into registered values('$flag','$firstname','$lastname','$dateofbirth','$email','$password','$companyname','$street','$country','$phone','$fax','$area')"; $resultq = mysql_query($queryq) or die("Your email entry already exists..so please register again.."); $sub="Registration"; pls any ideas will be highly appreciated.
  3. sorry do u mean the whole code?
  4. hello i have tried that i am stil getting the same errors
  5. hello i am trying to run this file upload form and it outputs the following error There was a error in uploading please try again..Sorry unable to connect to the database.. the paper directory is a folder inside a folder where i will like to store all uploaded files, pls any ideas why it is not working? [code] $dir="papers/"; $area=$_POST['area']; $event=$_POST['event']; //take values from previous file. $filename=basename($_FILES['paper']['name']); $dir=$dir.basename($_FILES['paper']['name']); $ext= explode('.',$filename); $ext = $ext[count($ext)-1]; if($ext==='doc' || $ext==='pdf') //check if the file is doc.   {      if(move_uploaded_file($_FILES['paper']['tmp_name'],$dir)) //move the file to papers directory.       {          print("The file as been uploaded");       }       else       {         print("There was a error in uploading please try again..");       }       $link = mysql_connect("localhost" , "outreach") or die("Could not connect to the database"); [/code] pls help me
  6. hello everyone can sumone pls explain the meaning of this code? if(!isset($_SESSION['login'])) { unset($_SESSION); session_destroy(); unset($_GET); unset($_POST);
  7. [!--quoteo(post=372481:date=May 8 2006, 09:21 PM:name=Crayon Violent)--][div class=\'quotetop\']QUOTE(Crayon Violent @ May 8 2006, 09:21 PM) [snapback]372481[/snapback][/div][div class=\'quotemain\'][!--quotec--] the simple watered down version: a session is a method of carrying variables over from 1 page to the next. all the information in the session variables are stored on the server where the script is. a session id is linked to all these variables, and the webbrowser sends the session id to the server when requesting access to a page that accesses those variables. a cookie is basically a variable with an expiration date that's stored on the user's computer. [/quote] thanks alot or that! much appreciated!
  8. hello can anyone please tell me the difference between cookies and sessions? as i am struggling on which one to use cheers.
  9. hello. i know this headers are for caching control henceb the browser is not allowed to cache the pages locally header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', FALSE); header('Pragma: no-cache'); apart from that what else does it do for me? how does ot make my programme better?
  10. [!--quoteo(post=372399:date=May 8 2006, 03:35 PM:name=Surfer Bum)--][div class=\'quotetop\']QUOTE(Surfer Bum @ May 8 2006, 03:35 PM) [snapback]372399[/snapback][/div][div class=\'quotemain\'][!--quotec--] That all depends on preference. Depending on the design of your website, sometimes it may look/function nicer to have a javascript alert that gives the error message, sometimes it is better to use PHP. The advantage to using javascript to show errors is that you can create a function to validate your form with javascript and it can let the user know about any errors before they even submit the form. This could save time and save them from having to re-type anything. An advantage to using PHP would be you could create a custom msg box that simply shows up on the page where you want it and looks the way you want it. Ideally you will want to look into using AJAX for validating your forms in the future... [/quote] thanks alot it really helped!
  11. yeah thats what i mean i have used an alert box in java scripting i just wanted to find out the advantages of doing this instead of just echoing the msg with php. thanks alot
  12. hello everyone, i have gotthis code, it is actually a php file, but If there is an error I use JavaScript to give an alert message using alert box in java scripting. pls can anyone me the advantages of using the javascrpt over just echoing the error using standard php. all ideas will be really appreciated.
×
×
  • 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.