-
Posts
15,229 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
PHP sending time sensitive, non-critical data to desktop computer
requinix replied to JeremyWA's topic in PHP Coding Help
There are a few ways: * fsockopen/fwrite/fclose * socket_create/socket_sendto/socket_close * stream_socket_client/fwrite/fclose -
That place where you have/had the echo? Put the HTML in there, like mail("graphics_Beth@idealwindow.com", 'Online Form: '.$subject, $_SERVER['REMOTE_ADDR']."\n\n".$final_message, "From: ".$fullname); ?> HTML here <?php ...You also need to move the reCAPTCHA bit around too: right now the thing at the end will output regardless of everything, so instead it should probably go instead an else block. } else { # set the error code so that we can display it $error = $resp->error; echo $error; } } else { echo recaptcha_get_html($publickey, $error); }
-
You don't even necessarily need to redirect: put that thank you page's HTML into this PHP script.
-
It "chose" $Songs[0]. That's the file.
-
$file is an array of filenames, not a single filename. You have to loop over it.
-
Loop over the array and do use String.replace for each item.
-
Find your php.ini and set error_reporting = -1 display_errors = onrestart your web server, and try your script. Hint: a problem (there may be others I didn't see at a glance) is with $mysqli->query("UPDATE product set status='$status_state' where product_id='$status1' ");
-
The pages are about answering math problems. I think such an experienced user wouldn't have problems answering the questions to begin with.
-
Sure, PHP can do it just fine. Simple? Yes. Easy? Depends on how well you know PHP.
-
error code - parse error, unexpected $ in /tier-11
requinix replied to Oscar11's topic in PHP Coding Help
Indent your code properly and start using an IDE and you'll see that you're missing not one but two }s. -
All you did was post some functions. How about posting how those functions are being used? And where the session values are being set?
-
$link=Relink($sr[condo_typename]); ... <a href="<?=$siteurl;?><?php echo"".Relink($link)."";?>">TITLE</a>Why are you calling Relink() twice? And the second time on the output of the first time? Just use it once. $link=Relink($sr[condo_typename]); ... <a href="<?=$siteurl;?><?php echo $link;?>">TITLE</a>Otherwise you have to actually describe the problem. "I can't use the function anymore" is worthless to us. And while you're describing the problem, post the entire contents of the function and not just the first line or two of it.
- 5 replies
-
- preg_replace
- no ending delimiter
-
(and 2 more)
Tagged with:
-
I'll believe it when I see it. Meanwhile, mcrypt.
-
The field is called "duration", not "days". Remember that all you're doing is changing how the user picks the value - you're not actually changing the structures or the names of anything.
-
The problem is you're trying to use the "$options" variable for two different things at the same time: one for an object and one for a row from a database query. Pick one to call "options" and change the name of the other one.
-
And what exactly did you try? If you missed it, I'm trying to help you figure out the answer, not just give you the answer and send you off.
-
So what have you tried? Ever used a before?
-
script not working when included in different file-
requinix replied to ryanmetzler3's topic in PHP Coding Help
What is the HTML outputted by all this? Do a View Source with your browser. Would also help to see the CSS and Javascript. -
1. Find your php.ini, open it up, set error_reporting = -1 display_errors = onand restart your web server. Any error messages? 2. If there aren't any errors, try modifying your redirect() to be function redirect($page) { session_id() && session_write_close(); header('Location: ' . $page); exit(); }
-
A comment? That is poor encryption and I would not use it for anything.
-
That code is a bit... crazy. Try a simpler $linkstrip = trim(preg_replace('/\W+/', '-', $linkstrip), "-");You may find that you don't want to convert apostrophes to hyphens, otherwise you can end up with things like "the-queen-s-jubilee". $linkstrip = str_replace("'", "", $linkstrip); $linkstrip = trim(preg_replace('/\W+/', '-', $linkstrip), "-");
- 5 replies
-
- preg_replace
- no ending delimiter
-
(and 2 more)
Tagged with:
-
OpenOffice/LibreOffice can do conversions as well, but being an actual application (though you don't need the whole windowed version) it's is a little harder to set up.
- 5 replies
-
- converter
- doc to pdf
-
(and 1 more)
Tagged with:
-
script not working when included in different file-
requinix replied to ryanmetzler3's topic in PHP Coding Help
Don't use relative paths in your HTML - that means no ".."s. <head> <link href="/ajax-poll/styles.css" rel="stylesheet"> <script type="text/javascript" src="/ajax-poll/jquery-1.3.2.js"></script> </head>Try to avoid relative paths in PHP too, as sometimes the way it locates files may not match what you expect. You can use a leading slash like in HTML, but you need something like DOCUMENT_ROOT before it (otherwise you're telling PHP to look in the root of your entire filesystem, not just the root of your website). <?php include $_SERVER["DOCUMENT_ROOT"] . "/ajax-poll/main.php"; include $_SERVER["DOCUMENT_ROOT"] . "/ajax-poll/poll.php";