Jump to content

techrahul87

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

techrahul87's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. fetch id of first table store it in any variable and then insert this variable in your second table...........is this you want to do....
  2. yes it is upload.php..try it on server......i was getting error.........
  3. hello i am uploading a file in a folder. the code is working fine on localhost. but oon server it is generating error. Parse error: syntax error, unexpected '}' in /home/content/v/i/b/vibescom/html/temp_dir/upload.php on line 1 here is the code <html> <head></head> <body> <?php if ($_SERVER['REQUEST_METHOD'] == "POST") { $target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } } else { ?> <form enctype="multipart/form-data" action="upload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> <?php } ?> </body> </html> please help me out
  4. :)thanks for explaining i'll try your code...........
  5. actually i m just 1 week experienced in php . i was asked for a php page which sends mail for 5 html pages. so i picked a code from internet and try to implement that page by sending hidden fields from all html pages... //to get values from enquiry.html to send mail if(!empty($_POST["enquiryhidden"])) { $site_admin=$_POST["mailto"]; // to whom mail has to be sent $name=$_POST["name"]; // name from user $Email=$_POST["email"]; // email of user $phone=$_POST["telephone"]; //user entries $mobile=$_POST["mobile"]; //user entries $address=$_POST["address"]; //user entries //$sub=$_POST["subject"]; $sub="enquiry from:".$name."through http://www.jaibharatsteel.com"; //subject of the mail $mes=$_POST["comment"]; //message $from = $name.' <'.$Email.'>'; $project=$_POST["project"]; //user entry //$data="mobile no: ".$mobile."\n"."phone no: ".$phone ."\n"."Address :".$address."\n"."Project :".$project."\n"."\n".$mes; // message body $data="dear sir/mam"."\n"."\t". "you have new enquiry through your website."."\n"."\n". "\t".$mes."\n"."information of sender"."\n"."\n". "mobile no: ".$mobile."\n". "phone no: ".$phone ."\n". "Address :".$address."\n". "Project :".$project; ae_send_mail($from, $site_admin, $sub, $data, // function calling array('X-Mailer'=>'PHP script at '.$_SERVER['HTTP_HOST'])); } //to get values from contactus.html to send mail if(!empty($_POST["contacthidden"])) { $site_admin=$_POST["mailto"]; $mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x"; $name=$_POST["contact"]; $Email=$_POST["email"]; $phone=$_POST["telephone"]; $mobile=$_POST["mobile"]; $address=$_POST["address"]; //$sub=$_POST["subject"]; $sub="contact from: ".$name."through http://www.jaibharatsteel.com"; $mes=$_POST["comment"]; $from = $name.' <'.$Email.'>'; //$data="mobile no: ".$mobile."\n". //"phone no: ".$phone."\n" //."Address :".$address."\n" //.$mes; $data= "dear sir/mam"."\n"."\n"."\t" "you have queries comments and reqirments from your web site"."\n"."\t".$mes."\n" "the basic information of sender is shown as:"."\n". "phone no:".$phone."\n" ."Address :".$address."\n"; ae_send_mail($from, $site_admin, $sub, $data, // function calling array('X-Mailer'=>'PHP script at '.$_SERVER['HTTP_HOST'])); } function ae_send_mail($from, $to, $subject, $text, $headers="") { if (strtolower(substr(PHP_OS, 0, 3)) === 'win') $mail_sep = "\r\n"; else $mail_sep = "\n"; function _rsc($s) { $s = str_replace("\n", '', $s); $s = str_replace("\r", '', $s); return $s; } $h = ''; if (is_array($headers)) { foreach($headers as $k=>$v) $h = _rsc($k).': '._rsc($v).$mail_sep; if ($h != '') { $h = substr($h, 0, strlen($h) - strlen($mail_sep)); $h = $mail_sep.$h; } } $from = _rsc($from); $to = _rsc($to); $subject = _rsc($subject); $val= mail($to, $subject, $text, 'From: '.$from.$h); if($val) { echo "your mail has been sent"; } else { echo "oops! try again"; } } now i dont have much idea about that user defined function ( ae_send_mail) i just got it from the internet.....there was written that it will improve secuirity....code is working fine for both pages.....but i m not sure of this code. comments please................... :'(
  6. hello everyone, i had used mail function in php. i was sending mail from my local host but in that case some errors were generated. then i tried it from server. now mail function is working properly but it is taking about 2 or 3 horus to to reach the inbox. is this a normal time.
  7. thanks for that ajax thing now i m getting wts going on...........
  8. hello everyone, I had done my internship in ASP.NET and sql server but i got a job in php/mysql. I have to learn php by my own. so i have to search through internet and that is how i got here and got registered i had cleared many doubts here alredy. great to be here
  9. hi, isn,t there any other way for it. like in c# we can make different functions for events by adding simply runat="server". and calling them. now i m getting really confused. please give an explanation....... :confused:
  10. hi everyone, i m new to php. all the coding I did in php is only on form submit. e.g if there is many buttons in one form and we have to perform different tasks. how will we do this in php. thanks for helping
  11. ok then i will use hidden fields.........thanks
  12. i have many html forms like enquiry, contact us, career form in which mail is being sent. i had created a sendmail php file in which I want to get values from all the forms. now how i acccess the form because forms name cant be used. should i use a hidden field. is there any other way........... please suggest me some thing........
  13. THANKS FOR HELPING ME OUT............. THANK U VERY MUCH
×
×
  • 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.