HumbleApprentice

Members
  • Content count

    14
  • Joined

  • Last visited

Community Reputation

0 Neutral

About HumbleApprentice

  • Rank
    Newbie
  • Birthday September 14

Previous Fields

  • Languages
    PHP, JavaScript,CSS and HTML/XHTML,

Profile Information

  • Gender
    Male
  • Location
    New York
  • Interests
    PHP, JavaScript and Web application development. Love Jesus, Love people and I am happy when the best in humans is displayed. I would like to encourage you all to be the best you can be. Study hard and pursue knowledge. It is said that PQ (persistent Quotient) triumphs IQ.
  1. I need some help. I uploaded by website to my yahoo server and a portion of my default page is not showing. I uploaded it several times but this did not help. Below is the code that is attaching itself to my page. What is it and how to I prevent it from attaching itself to my page. <!-- text below generated by server. PLEASE REMOVE --><!-- Counter/Statistics data collection code --><script language="JavaScript" src="http://l.yimg.com/d/lib/smb/js/hosting/cp/js_source/whv2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.webhosting.yahoo.com/visit.gif?us1416448385" alt="setstats" border="0" width="1" height="1"></noscript><script type="text/javascript">(function (d, w) {var x = d.getElementsByTagName('SCRIPT')[0];var f = function () {var s = d.createElement('SCRIPT');s.type = 'text/javascript';s.async = true;s.src = "//np.lexity.com/embed/YW/815eaf9c19bc9a633a6bf515b5ce0e60?id=9f91efaf9dad";x.parentNode.insertBefore(s, x);};w.attachEvent ? w.attachEvent('onload',f) :w.addEventListener('load',f,false);}(document, window));</script> Any help will be highly appreciated. HP
  2. Hi Dan, It works. Thanks. HumbleApprentice
  3. Hi Guys, I have a footer with a short line of text followed by a line of social icons, followed by another short line of text. I have too much spacing between the first line of text and the social icons. Could you please help me remove that space. Below is the css and html code. Any help will be highly appreciated. <div id="footer"> <p style="margin-left: 285px";>Follow Edutekk</p> <div id="social-media"> <ul> <li><a href="http://www.facebook.com/edutekk"><img src="images/facebook2.png"/></a></li> <li><a href="http://www.twitter.com/edutekk"><img src="images/twitter2.png"/></a></li> <li><a href="http://www.rss.com/edutekk"><img src="images/rss2.png"/></a></li> <li><a href="http://www.yelp.com/edutekk"><img src="images/yelp2.png"/></a></li> <li><a href="http://www.linkedin.com/edutekk"><img src="images/linkedin2.png"/></a></li> <li><a href="http://www.youtube.com/edutekk"><img src="images/youtube2.png"/></a></li> </ul> </div> <div id="copyright"> <p>©Copyright 2014</p> </div> </div> #social-media li {float: left; } #social-media ul {list-style-type: none; margin-left: 200px; padding-bottom: 5px; } #social-media a {margin: 0 15px 0 15px; } #social-media ul li {padding-top: 0px;} #copyright {padding-bottom: 20px; clear:both; margin-left: 400px; } #footer {clear:both; padding: 0; border-top: 1px #C3C3C3 solid; height: 150px;}
  4. Hi Everyone, I have a footer with a short line of text on the first line, a line of social network icons on the second line, and a short line of text on the third line. I have too much space between my first line and social icons. This footer div is within a wrapper. Could someone please help me to get rid of some of the space between the first line text and the social network icon? Below is the CSS and HTML code for the wrapper and the footer: I would highly appreciate your help. Html <div id="footer"> <p style="margin-left: 285px";>Follow Me</p> <div id="social-media"> <ul> <li><a href="http://www.facebook.com/#"><img src="images/facebook2.png"/></a></li> <li><a href="http://www.twitter.com/#"><img src="images/twitter2.png"/></a></li> <li><a href="http://www.rss.com/#"><img src="images/rss2.png"/></a></li> <li><a href="http://www.yelp.com/#"><img src="images/yelp2.png"/></a></li> <li><a href="http://www.linkedin.com/#"><img src="images/linkedin2.png"/></a></li> <li><a href="http://www.youtube.com/#"><img src="images/youtube2.png"/></a></li> </ul> </div> <div id="copyright"> <p>©Copyright 2014</p> </div> </div> CSS code #social-media li {float: left; } #social-media ul {list-style-type: none; margin-left: 200px; padding-bottom: 5px; } #social-media a {margin: 0 15px 0 15px; } #social-media ul li {padding-top: 0px;} #copyright {padding-bottom: 20px; clear:both; margin-left: 400px; } #footer {clear:both; padding: 0; border-top: 1px #C3C3C3 solid; height: 150px;}
  5. Hi Guys, Could you please help me out with this one. I have a style sheet that manipulate certain elements on my page. I would however like to know if I could style a portion of a paragraph with the inline style method. The code on my webpage is as follows: <p class ="two">Hello World - CSS allows you to modify margin, paddings and borders.</p> I would like to apply and inline style that only affects the word "CSS" want to change the font and the color but it does not work. example: <p class="two">Hello Word <style = "color:white; font-bold:,>CSS</style> allows you to modify margins, paddings, and borders.</p> This does not seems to work. Can someone please help me with the proper code? Please see attach file to look at the CSS code. I am new to this and would appreciate all the help. Thanks. Thanks so much Foxy Mod - span style works perfectly. colors.css
  6. Thanks DaveJ. Your respond was very helpful.
  7. Hi Guys, I am teaching myself JavaScript. This little program works but I am unable to pass the result to onclick. Could you please help. Thanks. <!doctype html> <html> <h2> 12 Times Table </h2> <script> function 12Times() { var times=1 for (times =1;times<=12; times++) alert(times + " times 13 is " +(times * 13) + "<br>"); } </script> <body> <input type="button" onclick="12Times()" value="12Times"> </body> </html>
  8. This is the error message: Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in C:\web\sqltest2.php on line 69It is complaining about the for loop and it is also complaining about the closing php tag at the end of the program
  9. Hi Foxy, I enclosed the php sections with <?php ?> and the html sections with the <p> </p> tags as you suggested but it still does not work. I placed a ?> tag on line 46. I also enclosed the form on line 49 and 59 with <p> and </P>. I open the <?php tag on line 62 and close it on line ?> 88; enclosed the other form on line 89 and 95 with <p> and </p>. I then enclosed the last section of the php script that begins on line 97 and ends on line 108 with <?php?> . Where do you suggest that I put the while loop should I replace the for loop with it. I tried that but it does not work.
  10. Hi guys, I am having trouble executing a program that I am doing in a course. The _END is included to tell the compiler were php ends and html begins. When I run the program I am getting an unexpected EOF error. Could I use something else other than _END to include html on the same page as php? I tried separating the different sections of php script with the <php ? ?> tags but this does not work either. Please help. Here is the code: Revised code without the _END. I replaced them with <php ?> where php appears and <p> </P> where html appears. <?php // sqltest.php require_once 'login.php'; $db_server= mysql_connect($db_hostname, $db_username, $db_password); if(!$db_server) die("Unable to connect to MySQL: " . mysql_error()); mysql_select_db($db_database, $db_server) or die("Unable to connect to MySQL: " . mysql_error()); if (isset($_POST['delete']) && isset($_POST['isbn'])) { $isbn = get_post('isbn'); $query = "DELETE FROM classics WHERE isbn = '$isbn'"; if(!mysql_query($query, $db_server)) echo "DELETE failed: $query<br />" . mysql_error(). "<br /><br />"; } if(isset($_POST['author']) && isset($_POST['title']) && isset($_POST['category']) && isset($_POST['year']) && isset($_POST['isbn'])) {   $author = get_post('author'); $title = get_post('title'); $category = get_post('category'); $year = get_post('year'); $isbn = get_post('isbn'); $query = "INSERT INTO classics VALUES". "('$author', '$title', '$category', '$year', '$isbn')"; if(!mysql_query($query, $db_server)) echo "INSERT failed: $query<br />" . mysql_error(). "<br /><br />"; } ?>   <p> //html form enclosed with <p></p> <form action="sqltest.php" method= "POST"><pre> Author <input type="text" name="author" /> Title <input type="text" name="title" /> Category <input type="text" name="category" /> Year <input type="text" name="year" /> ISBN <input type="text" name="isbn" /> <input type = "submit" value="ADD RECORD"/> </pre></form> </p>   <?php // section of php code enclosed with <?php> { $query = "SELECT * FROM classics"; $result = mysql_query($query); if(!$result) die("Database access failed: " . mysql_error()); $rows = mysql_num_rows($result); for($j=0; $j <$row; ++j) { $row = mysql_fetch_row($result); <pre> Author $row[0] Title $row[1] Category $row[2] Year $row[3] ISBN $row[4] </pre> } ?> //anothether section of html enclosed with <p></p> tags <p> <form action="sqltest.php" method="post"> <input type="hidden" name= "delete" value = "yes" /> <input type="hidden" name= "isbn" value ="$row[4]" /> <input type="submit" value="DELETE RECORD" /></form> </p>   <?php //final section of php script enclosed with <?php ?> tags } mysql_close($db_server); function get_post($var) { return mysql_real_escape_string($_POST[$var]); } ?>
  11. You can't read the file because you only call the function fopen. You did not create an argument telling the function what to do, so it is just standing there waiting for you to give it some instruction. The instruction is an argument. To tell it to get your line of code, the syntax is as follows: echo fgets ($file); //this gets whatever is in your filefclose($file); //This function close your file. You should always close your file after you open it.
  12. Thanks Guys, Problem solved. The UPDATE STATEMENT fixed it. Here is the code: UPDATE classics SETisbn = '9780141439969'WHERE title = 'Little Dorrit' ;
  13. Hi Guys, I tried UPDATE but it does not work. Here is the error message: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TABLE classics WHERE title ='Little Dorrit' CHANGE isbn = '9780141439969'' at line 1 I get the same message when I use ALTER
  14. Hi can someone please tell me why I am getting an error message with this ALTER STATEMENT. I entered the wrong isbn number in my table and would like to change it. The version of mySQL that I am using is 5.5.20-log. Thanks. ALTER TABLE classics WHERE title ='Little Dorrit' CHANGE isbn = '9780141439969';