Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

sunfighter's Achievements


Newbie (1/5)



  1. A while loop has to have opening and closing curly brackets to define the action. echo "<ul>"; while($row = mysql_fetch_row($result)) { echo "<li>".$row['insect_science']."</li>"; echo "<li>".$row['insect_com']."</li>"; } echo "</ul>"; Or: echo "<ul>"; while($row = mysql_fetch_row($result)) { echo "<li>".$row['insect_science']." -- "; echo $row['insect_com']."</li>"; } echo "</ul>";
  2. This is just a guess, but this line: document.getElementById(imgid).src = xmlhttp.getElementsByTagName("avatarMedium"); Should look something more along these lines: document.getElementById(imgid).src = xmlhttp.responseText; I'm taking it that the return here is the image src.
  3. Your html form needs to look like this: <form id="frm" action="ajaxChat.php">
  4. Redirect the page. Your page is in php so use that, not js. <?php header( 'Location: http://mywebsitei.com/wp-content/uploads/12345.jpg' ) ; ?> And this is all the code you need in the page B. Why you don't just make http://mywebsitei.com/wp-content/uploads/12345.jpg Page B is my question.
  5. You should download the major browsers and check for yourself. Easy thing to do but time consuming. One good thing in your favor is that it validates as good code. One bad thing is it's HTML5 so there is a good chance it won't work in any IE under 9
  6. <? is not used anymore. Use the full correct method of starting php <?php
  7. This is not an easy task. You do need to give more time to what you means by Is it an alphabetical order of authors and are you committed to doing this in php only? Does view by category mean only Romance novels or alphabetical listing of the categorizes? Anyway the display is probably easier to do with a table. You echo out the table heading and css info. Here is how to get the info out of the array and into a row: <?php $category = $books[1]["category"]; $title = $books[1]["title"]; $author = $books[1]["author"]; $publisher = $books[1]["publisher"]; $price = $books[1]["price"]; $isbn = $books[1]["isbn"]; echo <<<EOD <tr> <td>$category</td> <td>$title</td> <td>$author</td> <td>$publisher</td> <td>$price</td> <td>$isbn</td> </tr> EOD; ?>
  8. Why don't you publish the process.php code using the '#' tag above? I'm not going to open a file I don't trust.
  9. I don't think you'll get an answer from me, but I did make the database and ran your code. It didn't run. Got this message back "Unknown column 'hh.clock_id' in 'where clause'"
  10. To solve the empty string problem place this in start of if statement: if(isset($_POST['submit'])) { $empty_name = ""; $empty_content = "";
  11. While I see you added the phone number to the evaluation and to $res = addUser($_POST['username'],$_POST['password'],$_POST['email'], $_POST['phone'],'test_3.php'); You have not added it to the function function addUser($user,$pass,$email,$site_url) Nor to the insert $sql = "INSERT INTO users (username,password,email,active,level_access,reg_date) VALUES ('".$user."','".$pass."','".$email."',0,2,'".$reg_date."')"; Have you added a column to the database for the phone number?
  12. I find $eventname in four places in your code $eventname = str_replace("", "", $row['eventname']); <a href='index.php?view=event&content=tips&ttid=$eventid' title ='$eventname' class=\"fancybox fancybox.iframe\" style=\"color:#104E8B;text-decoration: none; \" > <strong><font size='2' face='Segoe UI' >$eventname</font></strong> </a> <a href='index.php?view=event&content=speaker&ttid=$eventid' title ='$eventname' class='fancybox fancybox.iframe' >$showsl</a> The first, $eventname = str_replace("", "", $row['eventname']); is where $eventname is defined. The str_replace() doesn't do anything, but doesn't hurt either. Maybe from old code. Could be remove for easier understanding of code. $eventname = $row['eventname']; It's the second group that I think you should send the $eventname to the next file. I'd do this: change href='index.php?view=event&content=tips&ttid=$eventid' To this href='index.php?view=event&content=tips&ttid=$eventid&eventname=$eventname' and in index.php add this line $eventname = $_GET['eventname']; after the $SOME THING = $_GET['ttid'];
  13. I'm going to guess here. Your title says "Problem with paragraph tag" so try this in your CSS p { display: inline; } It will remove the line breaks that the <p> tag has and maybe fixes the problem.
  14. I would use something like '*' to seperate your questions so file looks like this: *HTML is...,Main markup language for web pages,Cross-site Security,Cleverly Structured Scripting,eXtremely Safe and Secure,*PHP...,General-purpose server-side scripting language,Cross-site Security,Processing Hypertext Products,Process HTML Prettily Then look up the php explode() function . The explode() function breaks a string into an array. http://www.w3schools.com/php/func_string_explode.asp
  • 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.