Jump to content

LooieENG

Members
  • Posts

    236
  • Joined

  • Last visited

    Never

Everything posted by LooieENG

  1. <?php $page1 = $_SERVER['PHP_SELF']; ?> I think
  2. <a href="stuff.com" id="bulgaria">Bulgaria</a> Edit: id, not title, sorry.
  3. webhostingtalk.com is probably the best site you'll find for web host reviews. Also, shared hosting companies usually DO offer cPanel, GoDaddy just uses it's own custom panel AFAIK.
  4. "This is a part of my final year PHP project to be presented at my uni" I'm willing to bet your teacher's told you exactly what you needed to do throughout the project, so why weren't you paying attention, hmm?
  5. Missing a ' from here <?php bloginfo('template_directory);?> Edit: A better way would be <?php if (is_front_page()) {echo '<img class="lower" src="' . bloginfo('template_directory') . '/images/splash.jpg" usemap="#bg" style="border:none;" alt="background"/>'; } elseif (is_page('Portfolio')) /*use portfolio image*/{ echo '<img class="lower" src="' . bloginfo('template_directory') . '/images/portfolio.jpg" usemap="#bg" style="border:none;" alt="background"/>'; } elseif (is_page('Ordering')) { /*use ordering image*/ echo '<img class="lower" src="' . bloginfo('template_directory') . '/images/ordering.jpg" usemap="#bg" style="border:none;" alt="background"/>'; } else { /*for everything else use "blog" image*/ echo '<img class="lower" src="' . bloginfo('template_directory') . '/images/blog.jpg" usemap="#bg" style="border:none;" alt="background"/>'; } ?>
  6. :-\ I'd like it to run as fast as possible (not bothered about size) news would be either 0 or 1 The username will be 32 characters MAX The password will be md5, so 32 characters Thanks
  7. They probably use a database, and each comment has it's own row in a "comments" table, and one of the columns is "videoID", and when the video loads, it selects the comments where videoID = the ID of the video selected. I guess, anyway.
  8. Ah, didn't know about that (obviously ) but I'll look into it. Thanks
  9. Yeah, but what I mean is, under "postedBy" in the database, if I would have the userID, I'd have to perform ANOTHER query to find out the username belonging to that ID Thanks for the fast reply
  10. For each blog post, I dunno whether to echo <a href="index.php?u=ID">user</a> or <a href="index.php?u=user">user</a> I'd prefer ?u=ID, but then for each blog post would I have to perform a MySQL query to get the name of the user who posted it, or is there another way? Thanks
  11. You'll need JavaScript
  12. Edit: Wait, I don't understand the question
  13. Have you tried just <?php mail('email@domain.com', 'test', 'test'); ?> If it doesn't work, it's probably a problem with the server
  14. <?php $date = 3; $month = 'August'; $year = 1990; $timestamp = strtotime($date . ' ' . $month . ' ' . $year); echo $timestamp; ?> Just tried that, and it gave me 649663200 Seems to work, try that.
  15. You could use one column (wages) Say wages for hour one = 10 <?php $h = 10 // insert into db // db now contains 10 ?> then after another hour <?php $h = 20 $result = mysql_query("SELECT wages FROM table"); $row = mysql_fetch_array($result); $data = $row['wages'] . ',' . $h; // update db // db now contains 10,20 ?> And then you could explode the results at the end of 24 hours into an array <?php $result = mysql_query("SELECT wages FROM table"); $row = mysql_fetch_array($result); $wages = explode(',', $row['wages']); // $wages[0] = 10 // $wages[1] = 20 // etc.. ?> Not sure if that's practical though, there's probably a better way I don't know about P.S. Just read your post again, not sure where I got wages from, lol.
  16. I agree. The blonde jokes are brilliant
  17. Echo $timestamp before inserting into the database and see what value you're getting
  18. I gave the link to vroll.js http://www.littleflower.org/includes/vscroll.js Just include it with <html> <head> <title>Page</title> <script src="http://www.littleflower.org/includes/vscroll.js"></script> </head> <body> </body> </html>
  19. Okay, try this <?php // Connect to mysql database $con = mysql_connect('localhost', 'user', 'password') or die('Connection: ' . mysql_error()); mysql_select_db('logdata', $con) or die('Database: ' . mysql_error()); $consumed = $_POST['consumed']; $ProdNum = $_POST['ProdNum']; $result = mysql_query("SELECT * FROM SNAInv WHERE ProdNum = '$ProdNum'"); $copy = mysql_fetch_array($result) or die(mysql_error()); $subtract = ( $copy['QtyOnHand'] - $consumed ); $sqlrun = mysql_query("UPDATE SNAInv SET QtyOnHand = '$subtract' WHERE ProdNum = '$ProdNum'") or die(mysql_error()); $hist = mysql_query("INSERT INTO SNAInvHist ('ProdNum', 'ProdDesc', 'QtyOnHand', 'Consumed', 'RecvDate', 'ConSumDate') VALUES (`$copy[ProdNum]', '$copy[ProdDesc]', '$subtract', '$_POST[Consumed]', '$copy[RecvDate]', 'Now()')") or die(mysql_error()); echo 'Inventory For Part Number: ' . $copy['ProdNum'] . ' has been modified and a Transaction has been recorded. New Quantity is: ' . $subtract; mysql_close($con); ?>
  20. http://www.littleflower.org/includes/vscroll.js <div class="dj_container" style="color:#ffffff;"> <div id="dj_scroller" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"> <div id="vmarquee" style="position: absolute; width: 98%;"> <p>Journal your daily thoughts and experiences in this new unique Reflections of my Soul Journal. Visit <a href="http://www.littleflower.org/offerings/celebrations/"><font color="FFFFFF">here</a> to view and request this 20 page booklet filled with quotes of St. Therese and space for your written daily reflection.</font></p><p>We are now offering beautiful specially designed All Occasion Cards. Send a prayer filled Birthday, Get Well, Thank You, or Special card to a friend or loved one. Visit <a href="http://www.littleflower.org/offerings/celebrations/"><font color="FFFFFF">here</a> to view and request these unique St. Therese cards .</font></p> </div> </div> </div> Take a look at that to get an idea
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.