Jump to content

ignace

Moderators
  • Posts

    6,457
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by ignace

  1. lol ??? did you even tried it? i mean your code is full of errors!!
  2. because you print_r() it all you need to do is: $about_us0 = $chunkedArr[0]; // will give you the first part print_r() is to loop over an array recursively notice the r in print_r
  3. what iis basically does is changing the header when you access a certain folder, in apache you don't have such tabs, but you can mimic it by setting the same header in your php script, here's an example: http://be2.php.net/features.http-auth
  4. i can have a big massage anytime <form action="search.php?advns=<?php echo $advns; ?>" method="post" enctype="application .. this may be a bit strange for you, but you are able to receive get on a HTTP POST request, the other way around however does not work! else { $mov="mov"; $gam="gam"; $app="app"; $mus="mus"; $ebook="ebook"; $exp="exp"; ?> <div id="backgeounsd"> <input name="advns" type="text" class="seachc" value="<?php echo $advns; /* you forgot the $ */ ?>" /> <td width="40"><img src="LeftTablepart.png"/></td> <td width="501"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="table"> <a href=" <?php echo $_SERVER['PHP_SELF']; /* you forgot to echo it */ ?>/realysite/search.php?DlID=<?php echo $row["ID"]; ?> "> <?php if($search !="" and $advns != 1){ /* you wrote and if ($advns != 1) */
  5. why are you using recursion? is every line within your $filename a real path on the filesystem? i guess not as file(<html>) appears try: function processFile($filename) { $lines = file($filename); $returnArray= array(); foreach ($lines as $line) { list($title, $value) = explode(",", $line); $returnArray[]='<tr><td>Title:</td><td>'.$title.'</td><td>Value:</td><td>'.$value.'</td></tr>'; } } return $returnArray; }
  6. $get = $_GET['deleten']; // if not set in the url a null value will be set for $get; if ($get !== "") // null !== ""(string) thus execute what is on the next line
  7. Ever had a look at the smarty library? http://smarty.php.net You sound a bit like me, being picky and everything and not liking bad techniques i really could find myself in the zend framework http://framework.zend.com, go and have a look, maybe it works out as great as it did for me btw being picky just means where perfectionists
  8. I am using the zend framework as well and have some good background in it, pm me and i will help you get a full setup
  9. are you working with multiple database connections? cause if anyone would care to read a manual they would notice that mysql_query() actually have 2 parameters, so try adding the db connection resource (optional is only to be used when you in no way are able to write the parameter): $query = "INSERT INTO .."; $result = mysql_query($query, $dbConnection); if (!$result) die(mysql_error());
  10. sms can be compared to emails, an incoming sms can be handled through HTTP POST you need however to look for a server which supports sms gateways, you just need to redirect that gateway to your script to handle it (store in db or something)
  11. http://be.php.net/manual/en/book.pdf.php
  12. or just write <input type="checkbox" name="check[]" value="1" /> in php you could access it in this manner: <?php echo $_POST['check'][0]; // 1 ?>
  13. if ($_POST['user'] == $user_print) will never be correctly evaluated because at that point $user_print has not declared and is therefor converted to NULL so only when $_POST['user'] is NULL or equivalent the statement will pass
  14. You just want to validate the filesize of the file on the remote against the size of the local file? $filesize1 = filesize($file1); $filesize2 = filesize($file2); if ($filesize1 !== $filesize2) { if ($filesize1 < $filesize2) { /* second is bigger */ } else { /* first is bigger */ } } btw, are your sure this is correct? $goforit = ftp_get($conn_id, $file, $file, FTP_BINARY); // should translate to ftp_get(1, "c:/users/file.bla", "c:/users/file.bla", 2); notice the bold markings
  15. Basic: http://be.php.net/manual/en/ref.classobj.php Advanced: http://be.php.net/oop5.reflection
  16. $lines = file("path/to/file"); foreach ($lines as $line) { echo $line . "<br />\n"; }
  17. This is what you are looking for: <img src="image.php?file=2" width="64" height="64" />
  18. stripslashes()
  19. what you need is a bootstrap file which acts as a frontController: $page = $_POST['page']; $title = "Default Title"; $file = "index.php"; switch ($page) { case "development": $title = "Development title"; $file = "development.php"; break; default: $title = "Default Title"; $file = "index.php"; break; } if (!file_exists(PAGES_DIR . $file)) { $file = "index.php"; $title = "Default Title"; } include_once "header.php"; include_once PAGES_DIR . $file; include_once "footer.php";
  20. you are in serious trouble: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
  21. the code is from eCommerce i have been writing templates for it
  22. table: users (id, firstname, lastname, ..) table: songs (id, user_id, name, ..) // get user id $userid = $_SESSION['id']; mysql_query("insert into songs values (null, '$userid', '.. // preferably you would be using prepared query strings instead of this
  23. validate using: http://be.php.net/manual/en/book.ctype.php filter using: http://be.php.net/manual/en/book.filter.php
  24. you are already on the MUST be forum, can't believe you missed this great article: http://www.phpfreaks.com/tutorial/php-security
  25. if (mail(..)) { header("Location: thankyou.php"); }
×
×
  • 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.