-
Posts
236 -
Joined
-
Last visited
Never
Everything posted by LooieENG
-
<?php $page1 = $_SERVER['PHP_SELF']; ?> I think
-
<a href="stuff.com" id="bulgaria">Bulgaria</a> Edit: id, not title, sorry.
-
<?php echo strlen($var); ?>
-
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.
-
Need help finding the error in this code -* simple*
LooieENG replied to o2cathy's topic in PHP Coding Help
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"/>'; } ?> -
:-\ 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
-
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.
-
Ah, didn't know about that (obviously ) but I'll look into it. Thanks
-
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
-
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
-
It should be set to 777
-
Edit: Wait, I don't understand the question
-
[SOLVED] Form working, yet email isn't received?
LooieENG replied to Heyzoos's topic in PHP Coding Help
Have you tried just <?php mail('email@domain.com', 'test', 'test'); ?> If it doesn't work, it's probably a problem with the server -
File > Save Page As
-
[SOLVED] Blog, php, mySQL problems
LooieENG replied to oregoncurtis's topic in Beta Test Your Stuff!
<?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. -
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.
-
I agree. The blonde jokes are brilliant
-
[SOLVED] Blog, php, mySQL problems
LooieENG replied to oregoncurtis's topic in Beta Test Your Stuff!
Echo $timestamp before inserting into the database and see what value you're getting -
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>
-
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); ?>
-
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