Jump to content

AyKay47

Members
  • Posts

    3,281
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by AyKay47

  1. didn't scroll down the entire code... normally the best/easiest way to spot these type of errors is to look at a "view source" of the code to see what it is actually doing
  2. welcome to phpf
  3. the code that you posted shows me a table with one row and 4 columns, plain and simple.. are you trying to add to that table and it's not working? Or is the code that you posted displayed funky results?
  4. no mysql error received?
  5. should be short and catchy, does it have to have antiques in the name?
  6. I havn't dealt with a situation like your before, but as mjdamato said, that looks like something caused by your hosting company...
  7. what is the name of the file that the code you posted is stored in?
  8. you refer to the error as "it", can we see exactly what the error is so we may know how to address it
  9. Why are you creating an instance of Phash that you don't even use? In your generateHash function, you don't even use the first argument...? Not sure if you are aware, but php.net has excellent documentation on OOP... http://php.net/manual/en/language.oop5.php
  10. I know this isn't what you asked, but if you wanted to sort each array separately you can write it like this $array = Array ( [0] => Array ( [question_id] => 51 [ratio] => 1 ) [1] => Array ( [question_id] => 45 [ratio] => .7 ) [2] => Array ( [question_id] => 55 [ratio] => 0.5 ) [3] => Array ( [question_id] => 34 [ratio] => .2 ) [4] => Array ( [question_id] => 57 [ratio] => 0 ) ) array_multisort($array[0],SORT_DESC); array_multisort($array[1],SORT_DESC,SORT_NUMERIC); //etc.....
  11. while loop, to make a switch work the way you would like it to here would entail more work than is necessary
  12. perhaps I should have explained further, the link was for insight on the functions available for the txt file(s) specifically. I have not read into the relations of .pdf .doc files with PHP....that is all you mjdamato
  13. haha, very true. OP you will need to give us more code than that...doesn't look like you are using explode correctly either unless your $start and $end variables contain delimiters..which I doubt. Please don't give us code and say "here it is do all of the work for me" This is a volunteer site that offers help that would normally cost money, for free....please make an effort in assisting us further
  14. your code is a mess and needs cleaned up, I will clean it up for you. Also, view the link that premiso provided for more information on using correct parse syntax for variables inside of double quotes.. Do you receive any parse errors? <?php $name_first = $_POST['name_first']; $name_last = $_POST['name_last']; $phone = $_POST['phone']; $email = $_POST['email']; $message = "First Name: $name_first \n Last Name: $name_last \n Phone: $phone \n Email: $email \n"; $to = "$receive_email"; $subject = "Registration to $company_name"; $from = "$receive_email"; $headers = "From: $from"; $mail = mail($to,$subject,$message,$headers); if(!$mail){ ini_set('track_errors,1'); print $php_errormsg; }else{ print 'Mail Sent. Click <a href="register.php">here</a> to go back!'; } ?>
  15. AyKay, you might be mis-understanding his intentions. TO me, it seems that he does not want the variables parsed, instead he wants a full php code to store in a file, IE write to file. Either or, I outlined how to fix it if that was not what he wanted with the brackets {}. But yea, given the context, I do not think he wants the variables to be parsed. I could be wrong, but that is just how I took this code. true premiso, this sounds like a simple misunderstanding of what the OP wants..well at least we have provided him both ways to do it.... sorry if I came off as rude
  16. premiso, I think you are misunderstanding the syntax of the heredoc, if he does what you have suggested, none of his variables will be parsed... OP, i think that you are receiving this error due to a concatenation error.. try using the complex syntax here $stringData2 = <<<EOF <?php $name_first = {$_POST['name_first']}; $name_last = {$_POST['name_last']}; $phone = {$_POST['phone']}; $email = {$_POST['email']}; $message2 = 'First Name: " . $name_first . " \n Last Name: " . $name_last . " \n Phone: " . $phone . " \n Email: " . $email . "'; $to = '" . $receive_email . "'; $subject = 'Registration to " . $company_name . "'; $message = $message2; $from = '" . $receive_email . "'; $headers = 'From:' . $from; mail($to,$subject,$message,$headers); echo 'Mail Sent. Click <a href="register.php">here</a> to go back!'; ?> EOF; Also, in your first post you were using the nowdoc syntax, this was introduced as of PHP 5.3, since you are running PHP 5.2, this syntax will not work...
  17. there are many file system functions...take a look here http://us.php.net/manual/en/ref.filesystem.php
  18. what are you talking about? Any information that is gathered using the "file" type input attribute is stored in the $_FILES array, this include the file name, size, tmp folder that it is stored in, etc...
  19. PFM, the singles quotes are for nowdoc syntax... OP, what PHP version are you running?
  20. this is probably due to a space right after <<<'EOF'
  21. As PFM said, this is not a file _path, its a URL. Also, file_exists will return not work when used on remote severs
  22. not a problem, as far as your regex is concerned, this will not work as expected for what you are looking for it to do. You need to escape the period "." and write it a little different.. preg_match('/^([a-zA-Z0-9_-]{2,100})\.(jpg|gif|png|jpeg)$/i //this will isolate the extensions names, allowing only those
  23. 1. Looks to be a rather well organized code, with good logic 2. what are you trying to accomplish with the preg_match? preg_match('/^([a-zA-Z0-9_-])*.([a-zA-Z]){2,100}$/i doesn't look quite right... 3. Also in your code here foreach ($errors as $error) { $SiteErrorMessages .= "$error <br />"; } } } ?> <h1>Image Upload</h1> <?php // if errors found display them here if( isset( $SiteErrorMessages ) ) { echo SiteErrorMessages(); } I'm not sure where your SiteErrorMessages function is coming from, but to echo the errors you can simply place the foreach loop where that function is now..like this if(!empty($errors)){ foreach($errors as $error){ echo "$error <br />"; } }
  24. are you really that hostile to a forum that gives programming advice for free?
  25. Just breathing in NY costs you an arm and a leg.
×
×
  • 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.