-
Posts
15,231 -
Joined
-
Last visited
-
Days Won
427
Everything posted by requinix
-
Not the most helpful message, is it? You get that when a PDOException is thrown. It's available as the $e variable and very likely has some useful information inside of it...
-
You've posted a few pieces of code without any context to how they are used. That makes it really difficult for anyone but you to know what you're talking about. If clickedD.php is where the AJAX request with the dentist's name is sending its data then only clickedD.php has the dentist's name available to use. The AJAX happens after the page loads, so PHP cannot time travel and take the information from it and retroactively change what happened when it was first creating the page. Without knowing more about what you're doing, I would say that you "have to" use clickedD.php and AJAX to modify the page with whatever information you want - information which would have to be returned by clickedD.php itself. But I suspect there's an easier method to do what you want. No way for me to know what it is, but I do believe there is one.
-
1. The second argument to add_filter() is the name of a function WP should call when it wants to use whatever filter. The name of your function is "new_mail_from_name" and not "alphaequipment". 2. get_option() will want the name of the option it should get. An option name would be like "blogname". You very likely do not have an option named "alphaequipment.com". Have you tried using that add_filter + function code without making any changes to it?
-
Showing all data initially before a filter in CodeIgniter
requinix replied to JJM50's topic in MySQL Help
I don't know what "day 0" is, but you can get a string representing today's date with, surprisingly enough, the date() function. -
insert data in form element does not insert into my tables?
requinix replied to sashavalentina's topic in PHP Coding Help
You are putting $_POST values directly into the query. The first step to fixing your problem is to stop doing that and to use prepared statements instead. -
Showing all data initially before a filter in CodeIgniter
requinix replied to JJM50's topic in MySQL Help
if(isset($fdate)){ $content['fdate'] =$fdate; }else{ $content['fdate'] = ''; } if(isset($tdate)){ $content['tdate'] =$tdate; }else{ $content['tdate'] =''; } That looks relevant. Have you tried changing those two empty strings to be something else? -
CSS classes is not some magical transformation thing where you put some mystical letters on your HTML and it mysteriously gains some supernatural attributes like "makes the text black". They aren't some special codes you enter into your keyboard to unlock secret powers on a webpage. A class is a name. A simple name. And only a simple name. w3-#000000 is not a simple name. It's got this placeholder at the end that says "okay, I put some thing in here, now insert that somewhere else". And that does not work. Take some time away from memorizing the w3.css stuff to learn about what CSS is and how it works. Because w3.css is CSS. Not some fancy alternative to a prettier internet, but a bunch of pre-fabricated concepts that some people far out on the fringes of the world wide web decided would be Good Thingsā¢ that other people might want to copy.
-
style="color: #009000"
-
An unset upload_tmp_dir is completely okay. What are you trying to install? What error is it giving?
-
Dynamically Create Card Grid Using Forech In PHP
requinix replied to johnman's topic in PHP Coding Help
You're doing a new container/row for each result from the query. Shouldn't you be using a single container/row and then a new card for each result? -
Why do you need to change the upload directory? upload_tmp_dir being "no value" only means that it wasn't configured in the php.ini and so PHP will use the system's default temporary directory for storing uploads.
-
You're caring a lot about something that doesn't matter. If you want to avoid work, such as learning for yourself, then try not using quotes ever. Eventually you'll find a case where not using quotes was wrong. Then you'll know.
-
Except for the occasional time when you "have" to use quotes, such as with font-family names that contain spaces (like "Comic Sans") or with url()s that contain unusual characters (especially parentheses), most people don't use them. Definitely not for numeric values, like 100% or 15px. That's weird.
-
Nicer than storing generated PDFs on your server is generating them at the time they're needed. Because, at least in the case of invoices, the data supporting its contents shouldn't ever change.
-
That's ridiculous. Fight it. By adding an event listener for the quantity textbox's "input" event (when someone changes the value), doing the math, and updating the table cell. There are other HTML markup changes I would recommend to assist with that, but we're not at that point yet.
-
You've told us that it does not do what you want it to do but you haven't told us what it does do. What do you expect to see happen? What do you actually see happen? What have you tried so far to debug this?
-
With vertical-align.
-
With PHP? Yes, but not in a good way. Javascript is the answer. Why do you want to avoid it?
-
File paths and URLs are not always the same thing. Look at your browser's address bar right now: does it say? https://forums.phpfreaks.com/var/www/forums.phpfreaks.com/index.php?controller=idontknow&action=something&whateverelse&id=313889&name=altering-percieved-resource-path If your $root is also the root of the website then there's a really easy way to get an absolute path: start with a slash. That's it. / in the URL will correspond to the $root. <link rel="stylesheet" type="text/css" href="/css/actors.css"> <link rel="stylesheet" type="text/css" href="/css/gallery.css">
-
A few different ways of solving this, and the ones I like involve continuing with the food[x][y] names but making sure to give every "x" position a value. Because "food[][y]" is very much not going to work. Consider this markup: <input type="hidden" name="row[1]" value="1"> <input type="text" name="fruit[1][name]" value="Apple"> <input type="number" name="fruit[1][qty]" value="1" min="0"> <input type="hidden" name="row[2]" value="2"> <input type="text" name="fruit[2][name]" value="Orange"> <input type="number" name="fruit[2][qty]" value="3" min="0"> <input type="hidden" name="row[kljdshglkjsdfg]" value=""> <input type="text" name="fruit[kljdshglkjsdfg][name]" value="Banana"> <input type="number" name="fruit[kljdshglkjsdfg][qty]" value="6" min="0"> row[x] tells you what the existing ID number is. The "x" could be anything, but the ID number itself is convenient (even if redundant). Then the fruit[x][y] data belongs to that row in the table. If row[x] is empty then it does not exist yet. The "x" can still be anything, even though it doesn't exist, but picking a value anyway means you can group the fruit data by that key. If those additional fields are generated by Javascript then you provide an "x" with any random value. Such as literally a random value. Or a non-random but unique value like the current timestamp, though you would have to get at least millisecond precision to make sure there aren't duplicates if I want multiple rows added in the same second. The only gotcha with the arbitrary "x" is that you have to be careful with numbers because of how PHP manages array keys: if you picked the current timestamp with milliseconds, two rows in quick succession might be x=1234567890.123 and x=1234567890.456, but PHP will take both of those numbers and truncate them to integers, resulting in losing the first row's data because the second overwrote it.
-
You have a problem with file paths and somehow making one file appear to be in another place is the opposite of a solution. Consider that someday you, or maybe someone else, would look at that code and wonder how the hell it seems to be including the correct file when the file path is clearly wrong. 1. If you need to move the file then that sucks. Move the file and get it over with. IDEs can often help with rename operations, otherwise it's real simple to do a quick global search for "page.php" and update the paths you find; unless you have hundreds of files, that should take only a minute or two. 2. If you do have a lot of references to change then that hints at an underlying problem in how you use files for reusable code. Give it a few minutes of thought to see if maybe there is a better way of arranging your code or whatever so that it's accessible in a way that makes more sense. 3. Don't use relative paths. Use an absolute path based on the DOCUMENT_ROOT, as in include $_SERVER["DOCUMENT_ROOT"] . "/pages/page.php";
-
How much troubleshooting have you done on your own? Is the method producing the correct return value/response? Is the AJAX request working as expected? Is the Javascript producing errors?
-
PDO Connect & Session error (pictures of error codes)
requinix replied to LeonLatex's topic in PHP Coding Help
Unfortunately you cut off the screenshot of those error messages just when they were getting to the good parts. Something is including header.php a second time, after the first time when marina.php included it. Fix whatever logic error caused you to decide you had to include it a second time. Then switch to require() instead of include(), -
If you're having problems with some code then you should probably post the code.