Eiolon
Members-
Posts
358 -
Joined
-
Last visited
Everything posted by Eiolon
-
I am having trouble figuring out the right keywords to search for this, but what would I need to research if I want a user to send an email to a specific address (i.e. support@domain.com) and to have it create a new MySQL database entry, sort of like a help desk would generate?
-
Ah, thanks. I used eregi to escape it and it's working now.
-
I am using PHP with ODBC to connect to an existing MSSQL database to query for some names. When I query a name that has an apostrophe in it, I get an error. Example typing O'Malley as the name:
-
PHP does not know that $address is a web address. You need to make sure you are putting either http:// in front of cnn.com for $address, or you need to add http:// in the link. So either this: $address = "http://www.cnn.com"; <a href="<?php echo $address ?>">Go To</a> or $address = "cnn.com"; <a href="http://<?php echo $address ?>">Go To</a>
-
Have you tried grouping by the authorcourse in your SQL query?
-
Already did that. I can make this work with tables, I just know it's not proper to use tables for design elements. I can make it work with absolute positioning, but it only shows properly in IE and not Firefox/Chrome.
-
Floating them all to the left and use the clear did not work. Same result.
-
Need Help with a very simple Employee Time Clock
Eiolon replied to madjack87's topic in PHP Coding Help
The database needs a way to know if a time is clocked in / clocked out so it knows which times to subtract. If you have an employee that has clocked in and out 6 times in one day, how would it know which two to subtract? If an employee clocks in 2 times, but only clocked out 1 time, it needs to know not to subtract the last time clocked in because there has been no clock out yet. -
The IP is of the connecting server, so in your scenario, SERVER 2. You may need to edit your config file to make sure the MySQL server is listening to the SERVER 2 IP. By default I think it only listens to localhost.
-
If you are trying to connect to an external database, permissions must be set on that database to allow access. For example, with MySQL, you could need to grant access: GRANT ALL PRIVILEGES ON db_name.* TO username@'IP_ADDRESS_HERE' IDENTIFIED BY 'password_here'; Then you create a new database connection using the above information. EDIT: Forgot to mention if they are not using the default MySQL port you will need to define that as well.
-
I have a top and bottom image, each in their own DIV. However, there is white space that I cannot get rid of that is preventing the images from looking seamless. Here is a screenshot of the image: The images are in the HEADER and MIDDLE divs. #wrapper { margin:0px auto; padding:0; border:0; width: 1024px; } #header { margin:0; } #container { margin:0; padding:0; } #left { margin:0; padding:0; float:left; width:255px; } #right { margin:0; padding:0; float:right; width:255px; } #middle { margin:0; padding:0; float:left; width:514px; } <div id="wrapper"> <div id="header"> <img src="header.jpg" alt="Header"> </div> <div id="container"> <div id="left"> </div> <div id="middle"> <img src="middle.jpg" alt="Middle"> </div> <div id="right"> </div> </div> </div>
-
My script forces all names to start with a capital and lower case for the rest. However, some names have a ' or - in them. For example: Rosie O'Donnell or Carrie-Anne Moss With the script, the "D" in O'Donnell is lower case and the "A" in Anne is lower case. What do I need to do to make them capital? Here is what I am using: <?php echo ucwords(strtolower($row_persons['last_name'])) ?>, <?php echo ucwords(strtolower($row_persons['first_name'])) ?>
-
I assume jquery means I have to use javascript? That's not an option in my environment. We have to disable javascript in our browsers at work.
-
I am trying to insert the record when the link is clicked. This way I already have the auto incremented ID. I have to submit a couple of forms, but they are both on the same page. If I had the record ID already generated, I can redirect back to the form ID when the first form is submitted.
-
I know with a submit button I can have a new record created when clicking it, but is it possible to do with a text link?
-
I currently have a table where the name is one column for both the first and last name. Names are entered in the following format: Smith, John I would like to have a column for both first and last name. What would be the best method to splitting the names up so the first and last name ends up in the respective columns? I am trying not to have to retype everything as there are about 300 names.
-
Select button w/ image and have that image display on another page
Eiolon replied to soccerrprp1's topic in PHP Coding Help
I assume when you mean PHP only you are not involving a database... So if that is the case, have each radio button assigned a value. When submitted, get the value. In your PHP, tell it something like: $value = $_GET['submittedvalue']; if ($value == 1) { echo "<img src=image/image1.jpg>"; } elseif { ($value == 2) { echo "<img src=image/image2.jpg>"; } Just repeat until you've used all your images. Of course, make sure it is secure and if you are using a database you can make it more elegant. -
To make things simple, many people will create an admin area to do all the major administration tasks. One each page, when checking for the session, also check to see if the user has admin status. It would be unwise to allow regular users to see admin tools and functions, only to have them be denied access when executing the script. Just deny them access altogether by not letting them see the admin features in the first place.
-
I have a table and in it are two columns, a date column and basically a check bit column (1 or 0). Is it possible to schedule within MySQL the ability to change the bit from a 1 to a 0 if the date in the date column has been reached? It would need to be checked daily. Thanks!
-
Alright, I guess I'll just use number_format. Thanks.
-
I am using PHP 5.3.0. From the manual: (PHP 4 >= 4.3.0, PHP 5).
-
If I put this in a new HTML document: <?php $number = 1234.56; // let's print the international format for the en_US locale setlocale(LC_MONETARY, 'en_US'); echo money_format('%i', $number) . "\n"; // USD 1,234.56 ?> as per the PHP manual, I get: Fatal error: Call to undefined function money_format() in C:\wamp\www\accounts\test.php on line 7 Line 7 is: echo money_format('%i', $number) . "\n"; I have tried setting different locales and same result. Any ideas on what I need to do to get it to work?
-
I am trying to make it so two definiton lists are side by side instead of on top of each other. I'm not sure what to do to put them side by side. Thanks for your help! My CSS: #summary { background:#FAFAFA; border: 1px solid #E8E8E8; padding:15px 10px 10px 15px; font-family:Arial, Helvetica, sans-serif; font-size:13px; color: #000000; } #summary dl { clear: both; } #summary dt { float: left; clear: left; width: 130px; text-align: left; } #summary dd { margin: 0 0 0 0; padding: 0 0 0.7em 0; color:#000000; } and HTML <div id="summary"> <dl> <dt>Account</dt> <dd>SMALL TOOLS AND EQUIPMENT</dd> <dt>Code</dt> <dd>503-523</dd> <dt>Fiscal Year</dt> <dd>2010-2011</dd> </dl> <dl> <dt>Budget Amount</dt> <dd>$10000.00</dd> <dt>Amount Spent</dt> <dd>$5000.00</dd> <dt>Amount Remaining</dt> <dd>$5000.00</dd> </dl> </div>
-
Your WHERE clause says to check the ID of the upload record, and not the ID of the user:, based on your tables that is. $duplicatecheck = mysql_query("SELECT file FROM upload WHERE id='$userid'"); So: $duplicatecheck = mysql_query("SELECT file FROM upload WHERE userid='$userid'");