-
Posts
3,372 -
Joined
-
Last visited
-
Days Won
18
Everything posted by Muddy_Funster
-
Sorry.....what? Could you please explain in full the schema that you are using here? Youre last statement sounds more than just a little bit like the wrong way to do things.
-
the function is in my signature - it's not directly related to your question. The SQL you have won't work because you are trying to insert into two fields while only selecting one value to insert : $sql="INSERT INTO Models(MANU_ID, MOD_Name) SELECT MANU_ID FROM Manufacturers WHERE MOD_Name = '$_POST[model]'"; MANU_ID and MOD_Name are your two fields and you are only selecting the value of MANU_ID from the Manufacturers table to put in there. You need to balance both sides for the query to work.
-
and the problem with my suggestion is?
-
I suggest you stop trying, basic spam filter checks include matching the senders (From) address to the domain that it was sent from, so sending a mail through yourname123@gmail.com and trying to masquerade as yourname@somedomain.com will, in most cases, get your message dumped before it gets where it wants to be.
-
this isn't a PHP question... your looking for somthing along the lines of INSERT INTO table1 (value1) SELECT value1 FROM table2 WHERE value2 = 'yourValueHere'
-
Using foreach to update multiple records
Muddy_Funster replied to NiallFH's topic in PHP Coding Help
you will want to use a CASE on the insert, Barand should be able to knock you up something elegant if he sees the post, but have a look here in the interim : http://stuporglue.org/update-multiple-rows-at-once-with-different-values-in-mysql/ -
Passing array variable in edit form to another php page.
Muddy_Funster replied to Lawlssbatmbl's topic in PHP Coding Help
yeah, the second one looks good at a glance (assuming you want to send the value of $row['name'] as the $_GET['id'] variable to the next page), the code highlighter seems to like it aswell, just remember your semi-colon at the end. -
is there any way you could elaborate on that question?
-
Passing array variable in edit form to another php page.
Muddy_Funster replied to Lawlssbatmbl's topic in PHP Coding Help
variables within double quotes are evaluated, variables within single quotes are not. Please use code tags to enclose your code when posting in the forum. you are using single quotes for your echo's and as such nothing within them will be evaluated, it is a forced string literal. you can either concatenate the string by doing something like: echo '<a href="./folder/subfolder/file.ext?id='.$row['satisfaction_id'].'">click here</a>'; or use only double quotes and escape the ones that you want to remain in the string : echo "<a href=\"./folder/subfolder/file.ext?id={$row['satisfaction_id']}\">click here</a>"; You will see in the second option that the array reference is wrapped in curly braces - this is deliberate -
Need dropdown to show specific database table based on selection
Muddy_Funster replied to manderz's topic in PHP Coding Help
lets see your current code, we need to know what we have to work with. -
drop down list with if yes please specify option
Muddy_Funster replied to daniel0816's topic in PHP Coding Help
Your going to need to throw us a bone here. -
That's the best integration of RoboCop into a programming question I have ever seen This would be done in the SQL, not the PHP. Although, unless you have a bunch of fields that you are not listing then your table design is all wrong. With the information that you are presenting there is no need to have a single line per duck purchased, and in most cases you would link the single sales lines of this table to another table containing the duck level detail by building a relationship between the ids in each table. While you can get the results you are looking for with what you have - Is there a really good reason for this layout as it is painfully inefficient.
-
there are a few options, what do you have in place at the moment regarding user identification and persistence?
-
probably. What payment gateway are you using and how is it currently set up? Most payment systems store some level of transaction information anyway, so you should look into accessing that information rather than duplicating it - if it is available.
-
try google - search for responsive web design and/ or adaptive css
-
$n = array('lions', 'tigers', 'bears', 'kittens'); $o = array_rand($n) echo $n[$o]; $p = array_rand($n, 3); foreach($p as $q){ echo $n[$q]; }
-
you can't use fixed values in an adaptive design. You need to rethink your CSS, either put a container around the whole lot that has a min-width where the images still line up correctly, use % values for your margins and widths, or look into a completly adaptive layout that chooses the css to use on the fly depending on the window size.
-
@Kicken - I'm starting to think you don't like me.... My comment of "its that simple" was sarcasm. I'll clearly need to look into the use of italics or perhaps some colour coding for "words written in sarcasm or iriony"
-
It's really not clear what you are asking. This seems to be a theological question as far as web page creation is concerned, and not directly related to getting help with PHP code. I don't even what you are referring to as "big sites". Every site is made differently, depending on a number of things: who makes it, what it needs to do, how much information it needs to present, who the target audience is, how much money the company that commissioned it is willing to spend, and how much after build interaction the site administrators are going to need to make and how skilled these people are at programing web page content are just a few of the major factors. The internet doesn't have a stringent framework for how sites are built, regardless of size. One site can hold 3 pages, with no user interaction other than basic navigation, and have no real images or animations to speak of and still be coded in the same way, using the same methodology as a site with 80 pages, multiple user interaction points, email facilities, automated image displays and animations and social links and media sharing. Your question is to generic to get an accurate answer. Most sites I have come across use a combination of static and dynamic content. Static content for the content that is in fact static and never (or at least next to never) changes and dynamic content for the areas that do change a lot - or at least hold the potential to change regularly. Perhaps if you were a little more verbose and direct in your question we could give more specific information.
-
Change Clickable value Google Maps
Muddy_Funster replied to davefootball123's topic in Javascript Help
Have you looked at the disabled keyword at all? -
Actualy, the act of encrypting is just the application of a crytographic function to a message in order to create a digest - of which hashing is a "one way" example of this. So the use of encryption to describe one way hashing isn't strictly innacurate.
-
again with the no error capture on the mysql_query()?? My money is on the fact that you didn't wrap the sting that you are comparing user_name to in quotes - ie. the value translated from parsing $user_name - you normally need to have single or double quotes around string literal values. Consider the following example using some of MySql's table aliasing: SELECT user_name AS harry FROM users_table WHERE user_first_name = harry And now: SELECT user_name AS harry FROM users_table WHERE user_first_name = 'harry' Obviously you wouldn't normally aliase a table a name like that, but it should help to clarify the point - string litterals should be wrapped in quotes (either single or double it doesn't matter in SQL) as that's what the parser expects. When you feed things to the parser that it does not expect strange - and normally bad - things will happen. Also, when posting up your code please use the code tags (the <> icon in the toolbar of the editor) - paste your code, highlight all of it and then click on the icon - it will wrap your code in formatting that makes everyones life easier.
-
You're very welcome
-
I know, I was trying to inspire you to go find out try this: $sql = "SELECT user_name FROM permitportal WHERE user_name = '".$_SESSION['user_name']."'"; $query = mysql_query($sql) or die ($sql."<br>Caused an error - the server returned the following:<br>".mysql_error());
-
Wampserver, starting PHP in my desktop
Muddy_Funster replied to moisesbr's topic in Other Web Server Software
http://localhost/index.php the only colon ( : ) that you should have is the one after the http and before the two forward slashes ( // ) and it's all single slashes after the double one at the start.