-
Posts
5,717 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Adam
-
No if you're able to query the database through your admin tool it's working. The error you're getting says there's something wrong with the authentication, you must have a problem with your username and/or password.
-
Ha.. glad for you.
-
You mean to toggle the type? Try this: function toggleType() { var obj = document.getElementById('pass'); if (obj.type == 'text') { obj.type = 'password'; } else { obj.type = 'text'; } } Then call it with: onclick="toggleType();"
-
What? What do you think mysql_connect() is for? @TEDSON As amplexus was showing, selecting the database is done after the connection. The problem must be with the host, username or password. Is MySQL definitely running?
-
I wouldn't store the converted values like that. If you have a row for each single value for each currency, you're going to have a lot of data to enter/upkeep. What you should do is create a row for each currency, with an associated conversion rate that you're able to use within a formula to work out the value.
-
You don't need preg_replace() for that, you can just use parse_url.
-
Okay, but that's not a question. What are you asking for from us? From what I can see the table appears to be as you described it.
-
Okay, what's actually your question? One thing I do notice about your code at the moment is you're assigning each line of HTML to a new index in the array. Is that really necessary? Why not just build up a string and echo that...? $output = '<ul>'; $output .= '<table border="3" bordercolor="#000000">'; while ($row = $result->fetch()) { $output .= '<tr>'; $output .= '<td><img src="images/'.$row['pic'].'" width="67" height="100" /></td>'; $output .= '<td class="style10"><strong>'.$row['item_name'].'</strong></td>'; $output .= '<td>'.$row['item_description'].'</td>'; $output .= '</tr>'; } $output .= '</table>'; echo $output;
-
Just use str_pad.
-
You mean with the leading zero? That would depend how you're storing the number, what data type is the column?
-
Try reversing the if statement with "!" at the start of the expression, if the image displays it's probably a permissions problem.
-
No problem; just remember to unlink the temp file once you're done with it.
-
Then yeah, the temp file will be removed. You can get around it though by copying the file yourself with copy.
-
It works for me. If you comment out the echo $FechaMin; line, does it work then?
-
How are you moving/copying the file?
-
Perhaps they wrote the code themselves?
-
detecting "index.php" versus "index.php?var=xxx"
Adam replied to glennnall's topic in PHP Coding Help
Aha! waaaay! -
detecting "index.php" versus "index.php?var=xxx"
Adam replied to glennnall's topic in PHP Coding Help
You could just check if the QUERY_STRING server var is empty: if (empty($_SERVER['QUERY_STRING'])) { -
Uhhh. Once I escape the clutch of work I intend to get going myself! The match tonight as well, excellent!
-
2 problems, why won't alert box work and why won't image change?
Adam replied to heldenbrau's topic in Javascript Help
JavaScript is event-driven, so any calls to functions or code have to be triggered by an event. If you place the alert code within a function that is called by the 'onload' event, it'll run no problems: window.onload = function() { alert("This is a test alert message"); } Also you'll most likely need to use .style.backgroundImage to return the URL. -
Science has pulled through for us in the end.. http://www.thefirstpost.co.uk/68095,news-comment,news-politics,drinking-could-be-good-for-you-say-scientists?DCMP=NLC-daily I now intend to drink heavier than before.
-
Okay so this file is included wherever you want the breadcrumbs presumably? Looking at the code there's nothing I can see that would change the value, it must be happening within the file that includes it. Can you post the code of a page where this file is included, and the values are not correct?
-
Could you post the code for the 'breadcrumbs' page?
-
Can you give an example of it's "own value"? Sessions don't really sound like the right solution for breadcrumbs, they're really just suited to data that will last for the session (as the name kind of implies), or data that needs to be carried between a number of pages. Breadcrumbs generally should be generated for that specific page only. What I imagine is happening is that the breadcrumbs are being set on one page (maybe incorrectly set), that is carrying on to the next page and not being overwritten (or incorrectly set again). Though with no code examples or further information on how they're implemented, can't really help you.
-
Shouldn't there be 3 parameters in that call..?