Jump to content
php.lv forumi

Prova1ver

Reģistrētie lietotāji
  • Posts

    43
  • Joined

  • Last visited

Prova1ver's Achievements

Newbie

Newbie (1/14)

  1. to funkciju augstakais izmantos 3-4 x vispar, negribas iedzilināties phpmailera un meiginat to savienot ar bootstrap. Projekts nav nopietns uz šo momentu mail funkcija ir tas kas vajadzigs. kļudu vienalga neesmu sapratis
  2. Izveidoju contact.html formu kas savienojas ar contact-form-submission.php, bet man kaut k'a neiet varb'ut k'ads var izpalīdzēt izlabot kļūdu. Paldies contact.html <!DOCTYPE HTML> <html> <head> <title>My basic contact form</title> <link href="css/bootstrap.min.css" rel="stylesheet"> </head> <body> <div class="container"> <div class="page-header"> <h1>Contact Me</h1> </div> <?php // check for a successful form post if (isset($_GET['s'])) echo "<div class=\"alert alert-success\">".$_GET['s']."</div>"; // check for a form error elseif (isset($_GET['e'])) echo "<div class=\"alert alert-error\">".$_GET['e']."</div>"; ?> <form method="POST" action="contact-form-submission.php" class="form-horizontal"> <div class="control-group"> <label class="control-label" for="input1">Name</label> <div class="controls"> <input type="text" name="contact_name" id="input1" placeholder="Your name"> </div> </div> <div class="control-group"> <label class="control-label" for="input2">Email Address</label> <div class="controls"> <input type="text" name="contact_email" id="input2" placeholder="Your email address"> </div> </div> <div class="control-group"> <label class="control-label" for="input3">Message</label> <div class="controls"> <textarea name="contact_message" id="input3" rows="8" class="span5" placeholder="The message you want to send to me."></textarea> </div> </div> <div class="form-actions"> <input type="hidden" name="save" value="contact"> <button type="submit" class="btn btn-primary">Send</button> </div> </form> </div> </body> </html> contact-form-submission.php <?php // check for form submission - if it doesn't exist then send back to contact form if (!isset($_POST['save']) || $_POST['save'] != 'contact') { header('Location: contact-form.php'); exit; } // get the posted data $name = $_POST['contact_name']; $email_address = $_POST['contact_email']; $message = $_POST['contact_message']; // check that a name was entered if (empty($name)) $error = 'You must enter your name.'; // check that an email address was entered elseif (empty($email_address)) $error = 'You must enter your email address.'; // check for a valid email address elseif (!preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/', $email_address)) $error = 'You must enter a valid email address.'; // check that a message was entered elseif (empty($message)) $error = 'You must enter a message.'; // check if an error was found - if there was, send the user back to the form if (isset($error)) { header('Location: contact-form.php?e='.urlencode($error)); exit; } // write the email content $email_content = "Name: $name\n"; $email_content .= "Email Address: $email_address\n"; $email_content .= "Message:\n\n$message"; // send the email mail ("mas@mans.lv", "Epasta Title", $email_content); // send the user back to the form header('Location: contact-form.php?s='.urlencode('Thank you for your message.')); exit; ?>
  3. Labdien, Sāku taisīt projektu uz twitter bootstrap bāzes, vēlējos vienā no sadaļām izveidot contact us formu , kas pēc lietotāja formu aizpildes aizsūtīs datuus uz manu epasta adresi izmantojot gmail smtp. varbūt jau ir gatavs skripts, meklēju google atradu dažus , bet varbūt jūs kādu varat ieteikt. Paldies.
  4. Prova1ver

    Menu

    Paldies, no tam mazam atstarpem nevar tikt vala itka taisiju kad viss ir kopa sapludinats, bet tur man paraadas mazas atstarpes.
  5. Prova1ver

    Menu

    Sāku likt kopā majas lapu, bet man radās problēma. Menu es taisiju uz ps, sagriezu pa dalam tagad kad bildei pieskiru linku vinai iezimejas "lilaa stripas" un vinas nesaiet ciesi kopā. Ceru ka sapratāt :O Kods: <a href="sakums.html"target="vidus"</a> /*pieskiru html dokumentu kuru jaatver, un kuraa vieta vins ir jaatver <img src="images/menu_02.jpg"/> /*bilde
  6. Varētu kāds ieteikt kādu labu hostu, kuram ari butu stmp serveris un visi parējie kas nepieciešams roundcube. Negribās vairs turēt uz savas kastes :D
  7. Lattelekom piedava diezin tadu ekstru
  8. kaa var uzlikt 666 piekluvi, ja windowsaa ir read and execute kopa
  9. system('chmod -R 0777 D:\xampp\htdocs\mape\mape'); .htaccesss meiginaju, bet bez panakumie
  10. <? system("ls -l > mapesnosaukums"); chmod("test.txt", 0666); ?> Apmēram šads viņš ir? Un ja man jaliek uz visu mapi man jataisa atsevisk fails vai jaliek kods ieksā .htaccess?
  11. Sveiki, meigināju vienam failam uzlikt chmod 666 atlauju, bet man izmet šādu eroru: 504 Command not implemented for that parameter. Kas nav pareizi>?
  12. Ar ko iz vislabāk taisīt pašas mājas lapa skeletu, ar fremeiem vai kā?
  13. Man ir radusies problema ar phpbb 3, nevaru nekadigi nomainit! Maninu caur administratora paneli, pie style sadalas,imagesets. Saja vieta logo nomainot vins parada, bet ieejot lapa neviens logo neradas! Kur varetu but kluda?
×
×
  • Create New...