Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. need the other part of the code in admin.php, should say $_POST['password'] blarblar or maybe $_GET['password']
  2. gmail requires authentication this is not mine but looks sound
  3. I would assume your missing some details but without an account or even an O2 phone it very hard for me to say.
  4. i think this regex would suite better ^([^/]+)/((??:(?:[^\.]+\.)?[^/]+)/?){0,})/(.*?)/+$ then use RewriteRule ^(.*)$ index.php?module=$1&keys=$2&action=$3 [L,QSA] from blog/id.4/reply.5/add/ $1 = blog $2 = id.4/reply.5 $3 = add or blog/id.4/reply5/add/ $1 = blog $2 = id.4/reply5 $3 = add try this.. <?php echo $_GET['module']; $keys = $_GET['keys']; $path = explode("/",$keys); foreach($path as $key=>$val) { $split = explode(".",$val); $arg[$split['0']] = (isset($split['1']))?$split['1']:true; } echo $_GET['module']; echo $_GET['action']; ?> anyways i am getting some sleep
  5. i think you want to join the artists to the album.. ie SELECT * FROM blg_article_art LEFT JOIN blg_albums ON id_art=album_id ORDER BY album_title ASC have you got some sample data with an example of what you want to display
  6. see fwrite, fread
  7. for the date %s should be fine but you could also do this $isodate = sprintf("%04d-%02d-%02d", $year, $month, $day); as for the username check the query looks fine, could the problem be due to other members being inserted before the update? or the code around it ?
  8. USE CODE TAGS the # button PS this isn't really a PHP problem move to HTML/CSS section.
  9. It maybe because its late and i have had little sleep for the last 15 days but.. i'm confused:~ can you give an example of the url and what your trying to do with it
  10. Not a PHP problem, please move to HTML/CSS
  11. try this http://sourceforge.net/projects/html2fpdf
  12. fix what theirs no code! also before i help, could you prove you have written consent from IMDb
  13. Try google, or even googles shopping cart
  14. LOL , can you click solved please to close this
  15. And the problem is ?
  16. 1. i don't think theirs a feature/function, but you could use a trick, like always pass a get called rewrite, then use isset($_GET['rewrite']) = mod_rewrite is running. 2. Yes & No, Yes it can create the file BUT .htaccess file load before the PHP is parsed, so you could write an admin tool to make changes but not really create a dynamic .htaccess file, (which shouldn't be needed) 3. Not that i have found. 4. Yes, realpath($_SERVER["DOCUMENT_ROOT"]."/.."); should do it
  17. ~Sighs~ Ahh the good old wish list posts, I want:~ £8,000,000 tax free But wait a minute.. this isn't wishlist.com.. ??? sorry if that sounded rude, but Whats the problem, What do you have so far?
  18. this would make so much more sense as an array, however..try this $query = "UPDATE `mystore` SET `name` = '${p{$rowno}}', `desc` = '${desc{$rowno}}' "; untested
  19. you did it wrong then, post what you have done as a side note you could just remove the $_SERVER['PHP_SELF'] echo "<a href='?blar=blar'>More....</a>";
  20. just add error_reporting(E_ALL); to the start of your script, see here
  21. Posting your username and password is risky at best, in anycase, it would seam to be a problem with the CMS code, your need to post the code which has the problem
  22. try this <?php $con = mssql_connect("localhost","MyUsername","Mypassword"); if (!$con) { die('Could not connect: ' . mssql_error()); } mssql_select_db("MyDatabase", $con); $result = mssql_query("SELECT * FROM Account Numbers")or die(mssql_error()); while($row = mssql_fetch_row($result)) { Echo ("AccountNumbersID: ".$row[0]."<br />"); Echo ("Account Number: ".$row[1]."<br />"); Echo ("Description: ".$row[2]."<br />"); Echo ("Appropriation Balance: ".$row[3]."<br />"); Echo ("Net Change: ".$row[4]."<br />"); Echo ("Ending Balance: ".$row[5]."<br />"); } echo('Cheese'); ?>
  23. <?php $lines = file("data/vacancies.DAT"); foreach ($lines as $line) { $data[$key] = explode("|", $line); $number = str_replace(' ', '', $data[$key][7]); $numberb = str_replace(' ', '', $data[$key][11]); $searchb = str_replace(' ', '', $_POST['c']); //finds $number at the start and must contain $numberb anywhere if (preg_match("/^$searchb/i", $number) && preg_match("/$searchb/i", $numberb)) { print "match.<br />"; } } ?>
  24. full script <? if(empty($_POST['firstname']) || empty($_POST['email']) || empty($_POST['enquiry']) ) { die("Missing Parameters"); } if (!preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i', $_POST['email'])) { die("Invalid Email"); } // initialize variables for To and Subject fields $to = 'me@myemail.com'; $subject = 'Enquiry'; // build message body from variables received in the POST array $message = 'From: '.$_POST['firstname']."\n\n"; $message .= 'Email: '.$_POST['email']."\n\n"; $message .= 'Enquiry: '.$_POST['enquiry']."\n\n"; // add additional email headers for more user-friendly reply $additionalHeaders = "From: Martin<me@myemail.com>\n"; $additionalHeaders .= "Reply-To:$_POST['email']"; //bug fix //send email message $OK = mail($to, $subject, $message, $additionalHeaders); ?>
  25. it needs to be in a php file, and when viewed needs to be parsed.
×
×
  • 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.