AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
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
-
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?
-
no mysql error received?
-
should be short and catchy, does it have to have antiques in the name?
-
I havn't dealt with a situation like your before, but as mjdamato said, that looks like something caused by your hosting company...
-
what is the name of the file that the code you posted is stored in?
-
you refer to the error as "it", can we see exactly what the error is so we may know how to address it
-
Trying to learn OOP and classes with login, need help.
AyKay47 replied to nakins's topic in PHP Coding Help
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 -
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.....
-
while loop, to make a switch work the way you would like it to here would entail more work than is necessary
-
How to read pdf,word,txt files and display the content in webpage
AyKay47 replied to sherillnancy's topic in PHP Coding Help
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 -
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
-
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!'; } ?>
-
Parse error: syntax error, unexpected T_SL in .... line 28
AyKay47 replied to 00stuff's topic in PHP Coding Help
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 -
Parse error: syntax error, unexpected T_SL in .... line 28
AyKay47 replied to 00stuff's topic in PHP Coding Help
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... -
How to read pdf,word,txt files and display the content in webpage
AyKay47 replied to sherillnancy's topic in PHP Coding Help
there are many file system functions...take a look here http://us.php.net/manual/en/ref.filesystem.php -
two POST variables get recognized the third not...
AyKay47 replied to clausowitz's topic in PHP Coding Help
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... -
Parse error: syntax error, unexpected T_SL in .... line 28
AyKay47 replied to 00stuff's topic in PHP Coding Help
PFM, the singles quotes are for nowdoc syntax... OP, what PHP version are you running? -
Parse error: syntax error, unexpected T_SL in .... line 28
AyKay47 replied to 00stuff's topic in PHP Coding Help
this is probably due to a space right after <<<'EOF' -
As PFM said, this is not a file _path, its a URL. Also, file_exists will return not work when used on remote severs
-
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
-
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 />"; } }
-
are you really that hostile to a forum that gives programming advice for free?
-
Just breathing in NY costs you an arm and a leg.