Jump to content

khanahk

Member
  • Posts

    53
  • Joined

  • Last visited

Posts posted by khanahk

  1. The error there says your classid is 'obsolete', meaning whatever plugin that would normally play your video/other media likely will not now. You need a 'new' classid.

     

    You can search what the HTML5 classid is for the plugin you want to use; or

     

    If you upload your video (if it is a video), to youtube, they will provide you a code snippet to embed your video in a webpage, and it should work that way.

  2. It's hard to tell what you're actually going for without seeing your code. Can you post a snippet of all this in action?

     

    In any case, I have achieved what I believe you're going for using purely HTML and CSS before..

     

    You can assign each page on your website associated with a nav link a <body class="page1"> and so on, and in the navigation PHP include file simply assign an identifying class to each of your links, like

     

    <ul class="nav">
    
    <li><a class="page1" href="page1.php">page1</a></li>
    <li><a class="page2" href="page2.php">page2</a></li>
    <li><a class="page3" href="page3.php">page3</a></li>
    
    </ul>

     

    And then create the CSS rules in your stylesheet:

     

    
    a {color: black;} /* default link color */
    
    /* change link to red if we're on that page */
    body.page1 a.page1 { color: red; }
    body.page2 a.page2 { color: red; }
    body.page3 a.page3 { color: red; }
    

     

     

    ----

     

    If you REALLY want to do it by dynamically assigning a class to the nav link, you'll need jQuery's .addClass() and .removeClass(). But you may want to keep it simple

  3. LSW - Freelance is all I do at this point; online applications and websites for family and friends, and people connected to me by that route. I'm not 'pro' enough for the big-shots.

     

    I checked out Eclipse and my general feeling is... I don't have any idea how to use this. It's made for Java and I haven't even touched that realm yet -- although I would like to and plan to. I guess getting the PHP plugin for Eclipse would help but I feel the interface is too advanced for me at this point. There are many terms I don't know and such. Dreamweaver seems a bit simpler altogether.

     

    All the same I am still kind of stuck in the decision making; I figure I'll just keep learning code and not waste time learning some software. The former is more valuable to me (and truly ought to be to the professionals). Meanwhile I finish a degree in Environmental Sciences...arg.

     

    Thanks for the comments

  4. I'm not sure about the nature of your error. Is $salt properly defined in the class? Also, is $Database properly defined? WAMP's 'PHP Strict' errors are unlikely to cause problems on a live site (I believe, anyways). You may find that there are no errors if you put this stuff online. WAMP server is pretty picky and will complain about an 'undefined index' for something like

    $_POST[stuff]

    instead of

    $_POST['stuff']

    , which live web host servers are fine with (as they should be..)

  5. I like Coda but I use a PC, not a Mac.

     

    I currently have Dreamweaver 8, which is ancient.

     

    Questions:

     

    1. Is Coda available for PC?

     

    2. Does DW CS6 offer the same functionality as I see in Ben's videos (i.e. does the preview option WORK with php and other programming langugages, instead of previewing it in my browser all the time? I don't even use the DW8 preview)

     

    3. Any other recommendations for a PC IDE? I've done some research but I want to hear the praise/disgust from people, not the companies selling them.

     

    Thanks

  6. Kill the height=, width=, border= properties of your images in HTML and use CSS for them

     

    a img {border: 0px; height: 41px; width: 42px;}

     

    If that doesn't work, it may be because your file path for image contains spaces. This is a general no-no and you should rename the folder that contains them to not have spaces, i.e. /social-media-icons/

  7. I'm not yet a JSON/AJAX master so I don't know how to do this.

     

    I need a $_SESSION['name'] PHP variable to work with in my jQuery stuff and I don't know how to access it... consider:

     

    // the 'who is typing' shindig
    	$.ajax(
    	{
    		url: "whos_typing.html",
    		cache: false,
    		success: function(whos)
    		{	
                             // here I need to access $_SESSION['name'] and do stuff with it
    
    			$("#soandso").html(whos); //Insert who's typing into the #soandso div		
    	  	}
    	});
    

  8. Just keep learning, and commit yourself to be kind to those below you when you become utterly awesome, unlike this guy. You are your own limit, not them, no? So keep chugging if this is what you like to do and delete that guy's account/comment from your blog. Pride is foolishness

     

    I'm not a big fan of Wordpress although I am practically obliged to learn it..

     

     

    What is 'professional' anyways? Who cares? If you can get the job done, and done well, that is all that matters, and everyone knows it. So learn to get the job done, and done well, and you will be valued for it.

  9. Greetings,

     

    I am trying to reconcile the following reality:

     

    $query = "INSERT INTO mytable VALUES('', 'A user's input. It contains one or more apostrophes or quote marks.')"; 
    

     

    This, clearly, is a problem and I don't know how to reconcile it.

     

    This forum clearly has reconciled it. Consider my apostrophes and quote marks: ''' "" "' ' '"!!

     

    Thanks!

  10. Ben,

     

    You are most helpful...! the following now works to render every row within the specified SQL selection

    function renderTopics($cat)
    {
    	global $Database;
    
    	$query = "SELECT * FROM topics WHERE category = '$cat'";
    
    		$result = $Database->query($query);
    		while ($row = $result->fetch_array(MYSQLI_BOTH))
    		{
    			do {
    			print $row['name']."-----".$row['poster']."------".$row['category']."---".$row['created_date']."<br />";
    			} while ($Database->next_result());
    		}
    		$result->free();
    		$Database->close();
    
    
    }
    

    Thanks

  11. This is currently not working but may help you understand what I'm going for:

     

    function renderTopics($cat)
    {
    	global $Database;
    
    	if ($stmt = $Database->prepare("SELECT * FROM topics WHERE category = ?"))
    	{
    		$stmt->bind_param("s", $cat);
    		$stmt->execute();
    		$stmt->store_result();
    		$array = $stmt->store_result();
    		while ($row = $array->fetch_row())
    		{
    			printf("%s\n", $row[0]);
    		}
    
    	}
    	else
    	{
    		die("Could not prepare MySQLi statement.");
    	}
    }
    

  12. I've got

     

    function renderTopics($cat)
    {
    	global $Database;
    
    	if ($stmt = $Database->prepare("SELECT * FROM topics WHERE category = ?");
    	{
    		$stmt->bind_param("s", $cat);
    		$stmt->execute();
    		$stmt->store_result();
    	}
    	else
    	{
    		die("Could not prepare MySQLi statement.");
    	}
    }
    

     

    The question is... how do I access the results?! How can I set it to an array or whathaveyou?

     

    Thanks

  13. Ah! No, looks like your problem is this:

     

    $page_set = mysql_query("SELECT * FROM pages WHERE subject_id= {$subject["id"]}", $connection);
    

     

    I could be wrong, but I believe

     

    $page_set = mysql_query("SELECT * FROM pages WHERE subject_id= {$subject['id']}", $connection);
    

     

    will fix it

  14. It looks right to me, but maybe this will work?:

     

    Replace

    $subject_set = mysql_query("SELECT * FROM subjects", $connection);
    if (!$subject_set){
    die ("Database query failed: " . mysql_error());
    }
    

     

    with

     

    $thequery = 'SELECT * FROM subjects;';
    
    $subject_set = mysql_query($thequery, $connection);
    if (!$subject_set){
    die ("Database query failed: " . mysql_error());
    }
    

  15. I think the fundamental answer you're looking for is... no.

     

    You can't use PHP in a non-PHP 'page', or 'document', e.g. blah.html, in the way that you can write JS in a non-JS document, e.g. blah.html.

     

    This is the difference between a 'script' language (JS) and a 'text-processing' language (PHP, ASP, and the others), so to speak.

×
×
  • Create New...