Search the Community
Showing results for tags 'funtion'.
-
I built an application for a client of mine using PHPRunner about 3 years ago. It has functioned perfectly right up to today when they notified me that they were unable to Export any records. I have attached the error report that comes up when you run Export function. According to the report it is unable to find a file or path. I have been on to server with FTP client and all the paths, files and contents are present. Can anyone please give me any advise on what might suddenly cause this error after many years. All other functionality of the Database is fine. Many thanks, Carl.
-
Hi i'm new in this forum, but it looks like I can get help here I'm trying to figure out what I've do wrong but can't figure out. The error i get is: Fatal error: Call to undefined function validerFornavn() in /jail/www/inghor/tema5/inkluderevalidering.php on line 5 /* my php code is /* <?php include ("validering-navn.php"); $fornavn=$_POST ["fornavn"]; $etternavn=$_POST ["etternavn"]; $lovligFornavn=validerFornavn($fornavn); $lovligEetternavn=validerEtternavn($etternavn); if(!$lovligfornavn) { print("navn er ikke fylt ut riktig<br/>"); } if(!$lovligetternavn) { print("etternavn er ikke fylt ut riktig<br/>"); } if ($lovligfornavn && $lovligetternavn) { $filnavn="navn.txt"; $filopprasjon="a"; $linje=$fornavn." ".$etternavn."\n"; $fil=fopen($filnavn,$filopprasjon); fwrite($fil, $linje); fclose($fil); print("$fornavn $etternavn er nĂ¥ skrevet til fil<br/>"); } ?> /* This is the function file I includet "validering-navn.php" /* function validerFornavn($fornavn) { $lovligfornavn=1; if (!$fornavn) { $lovligfornavn=0; } if ($lovligfornavn) { return true; } else { return false } } Function validerEtternavn($etternavn) { $lovligetternavn=1; if (!$etternavn) { $lovligetternavn=0; } if ($lovligetternavn) { return true; } else { return false; } } ?> /** and this is my html */ <!DOCTYPE html> <html> <head> <title> navn tekstfil </title> </head> <body> <h3> navn tekstfil </h3> <form method="post" action="inkluderevalidering.php" id="inkludervalidering" name="inkludervalidering"> fornavn <input type="text"id="fornavn" name="fornavn"/><Br/> etternavn <input type="text" id="etternavn" name="etternavn"/><br/> <Input type="submit" value="fortsett"id="fortsett" name="fortsett"> <input type="reset" value="nullstill"id="nullstill"name="nullstill"><br/> </form> </body> </html>
- 2 replies
-
- funtion
- writeonfile
-
(and 2 more)
Tagged with:
-
Hello guys, i have a problem foreach($liga1 as $item) { $titlu = $item->get_title(); $link = $item->get_permalink(); $text = $item->get_description(); $data = $item->get_date('j M Y, g:i a'); $titlu = mysql_real_escape_string($titlu); $link = mysql_real_escape_string($link); $text = mysql_real_escape_string($text); $con = mysql_connect($dbhost, $dbuser, $dbpass); if (!$con) { die(mysql_error()); } mysql_select_db($dbname, $con); $sql = "REPLACE INTO stiri (id, titlu, continut, link, categorie, data) VALUES ('','$titlu','$text','$link','Liga 1','$data')"; mysql_query($sql); mysql_close($con);} So.. every time i run this script i get duplicate items in my db.. i tried with md5 but i get a timeout error, i set the limit but the tables aren't update.