370 Posted Topics
Re: You could try [URL="http://www.learnable.com"]http://www.learnable.com[/URL] - they do online courses including in asp.net. Just search at the site. | |
Re: Are your $_GET variables being populated? Have you tested the query in PHPMyAdmin with actual values to make sure it is working? Your filename=$f has no quotes around the $f. | |
Re: You column references in your queries and your result rows don't match the database structure you are showing. According to your table structure, it should be [CODE] $query = mysql_query("SELECT * FROM teamdb where sport='Basketball'"); while($row = mysql_fetch_array($query)) { echo '<option value='.$row['tid'].'>'.$row['tname'].'</option>'; } [/CODE] and [CODE] $query = mysql_query("SELECT * … | |
Re: Try this [CODE] // Get an image $queryi = "SELECT filename FROM images WHERE productid = '" . $row['productid'] . "' LIMIT 0,4"; $resulti = mysql_query($queryi) or die( "An error has occured: " .mysql_error (). ":" .mysql_errno ()); while ($tweener=mysql_fetch_array($result)) { if ($tweener['filename'] != "") { // Resize thumbs ready … | |
Re: Try putting your visited css above your hover css in your style sheet | |
Re: [CODE]SELECT * FROM blogs WHERE username='".$_SESSION['MM_Username']."'[/CODE] Use this code to only select the blogs written by the logged in user | |
Re: I have already answered this for you in another thread you started | |
Re: Can I ask why you want to show code on a website? | |
Re: It appears to me that you are not actually connecting to your database - you have a function to connect and you load that function into a variable but that is all. Take you database connection out of the function (i.e. to just let it happen when you load the … | |
Re: If you want to use design view to revise the page then yes you also need the related css and image files on your local machine within the site as they are on the remote server. ![]() | |
Re: All you are doing here is removing the error message, you are not solving the error itself. To me it appears that you are trying to user database_name.table_name to connect to your database and insert your data all within your insert query which I have never seen before in all … | |
Re: Have you checked that you are actually receiving the data in the 2nd page, either by looking at the url or by var_dump($_GET)? | |
Re: Use foreach on the 2nd array and then compare the results in the foreach against the first array using in_array | |
Re: Personally I would use two tables if you want to be able to easily search. So have your main jobs table and then a second that stores all locations per job (just store job_id and location_id and ensure you can store the job_id multiple times) then you can search this … ![]() | |
Re: As far as I know you can't combine INSERT and UPDATE queries. | |
Re: It is good to use existing class attributes to help you learn but only if you take the time to understand them and what they are doing so that in future you can create your own. | |
Re: You are saying if the $_POST['mode'] doesn't equal delete, then delete and you have also attached your delete query to a variable which I am not sure works in itself but definitely won't do anything the way you have it as the query isn't being exectued. Change it to: [CODE]elseif($_POST['mode'] … | |
Re: You are not declaring your $searchtype and $searchterm variables anywhere in the first page that I can see and you are not sending the data through in your URL properly and finally you need to use $_GET, not $_POST to grab variables and values from a URL. [CODE]echo '<table><a href="results.php?searchtype='. … | |
| |
Re: Try changing [CODE]CURDATE()[/CODE] to [CODE]date('Y-m-d')[/CODE] | |
Re: jQuery is not a replacement for JavaScript it is a JavaScript library to make coding with it faster, cleaner and easier. There is no replacement for JavaScript. | |
Re: Not sure if it is a typo in your post but you URL isn't sending the price - it finishes at &Variable and also the $price variable should not be in speech marks. If this isn't a typo (I am not sure what value should be attached to Variable so … | |
Re: Firstly, to correct your script: [CODE]<?php .... $conn ...blah blah blah... mysql_select_db ...blah blah blah... .... $query = mysql_query("SELECT * FROM teamdb WHERE sports='Basketball'"); .... ?> <html> .... <select name='whatever'> <?php while($row = mysql_fetch_array($query)) { echo '<option value"='.$row['teamid'].'">'.$row['teamname'].'</option>'; } ?> </select> .... </html>[/CODE] | |
Re: I would look at using something like Wordpress | |
Re: It is a PHP operator used to call methods and properties of a PHP class (used in Object Oriented PHP). This tutorial may help you understand better [url]http://bit.ly/vS6H9P[/url] | |
Re: It is just a short code for the jQuery variable. So instead of writing your code: [CODE] jQuery(document).ready(function() { . . . }); [/CODE] You can write: [CODE] $(document).ready(function() { . . . }); [/CODE] ![]() | |
Re: The for loop is incorrect but you are better off using a while loop as much easier for what you require: [CODE=php] $sql1 = mysql_query("SELECT equipmentid, description FROM equipment") or die(mysql_error()); while ($row = mysql_fetch_assoc($sql1)) { echo '<input type="checkbox" name="equipment" value="$row['equipmentid']"/> } [/CODE] | |
Re: You need to use a while loop, as such: [CODE] $email = mysql_query("SELECT * FROM mail") or die (mysql_error()); while ($row = mysql_fetch_array($email)) { echo $row['email'].'<br>'; } [/CODE] The <br> is just to break up your results for this example. | |
Re: Is anything actually being set to your session? Use var_dump to check your session variables have values: [CODE]var_dump($_SESSION);[/CODE] If they have then try changing [CODE]if(!$_SESSION['valid_user'] == 1)[/CODE] to: [CODE]if(!isset($_SESSION['valid_user']) || $_SESSION['valid_user'] !=1)[/CODE] | |
Re: Not sure if I completely understand what you are trying to do but if you want the table to expand without expanding the containing div then you need to set a maximum height and hide the overflow in your main div: [CODE] #main { height: 400px; overflow: hidden; } [/CODE] … | |
Re: You are not changing the background colour of your td which also has padding. I am not sure why you are applying the a:hover to the whole table rather than the tr or td only but add td a: hover as well and it may help: [CODE] table a:hover, td … | |
Re: In MySQL I would use: [CODE] SELECT client_id FROM client WHERE client_id NOT IN (SELECT client_id FROM purchase) ORDER BY client_id DESC [/CODE] ![]() | |
Re: I like the book The Principals of Beautiful Web Design - [url]http://bit.ly/v9Py9C[/url] and also Simple and Usable is a good read to get you thinking - [url]http://amzn.to/tysQVP[/url] | |
Re: The first question you need to answer is what are you searching - records in a database or the website itself? | |
Re: You would need to use JavaScript/Ajax to run your php script on selection from the dropdown list and then populate the textbox with the query results | |
Re: Please post your script and an example of your html where you want the text to change | |
Re: Sorry but I am not here to write code for people unless they already have code that they are having a problem with. If you want to get this to work you need to go off and learn PHP for which there are hundreds of resources across the web. | |
Re: Not sure what you are trying to do on line 28 but for one you have already called session_start() on line 3 so you don't need to call it again, plus session_register is deprecated and you can shorten your code, try: [CODE] //log in //username if($_POST['Enter']){ $myemail=mysql_real_escape_string(stripslashes($_POST['myemail'])); $mypw=mysql_real_escape_string(stripslashes($_POST['mypw'])); $sql="SELECT * … | |
Re: I am not sure if this is the problem as you haven't put your coe in code tags in your post so I don't know where the line causing the error actually is, but you have an error here (an extra comma after the 'comment' column name): [CODE=php] $sql = … | |
Re: I am currently learning JavaScript, so forgive me if I am wrong but I was lead to believe that there is no function getElementsByClassName, you have to create it as a function yourself to be able to use it. I am also not sure that removeAttribute works in IE (not … | |
Re: Sorry to be harsh but I suggest you go and learn about MySQL and PHP from the hundreds of resources and tutorials online. | |
Re: Float the image left and put a 1px border around the image and the intro text (remove after testing) to check where they are positioning on the page (i.e. if they are overlapping which would push the text down). | |
Re: Firstly (this may not resolve your problem). The auto in the margin element should be specified in the #mainContainer div, not in the body and the body needs to be centered using text-align: [CODE] body { height:100%; width:100%; [COLOR="red"]margin:0; text-align: center;[/COLOR] background-image: -webkit-linear-gradient(top, #E5E5E5 30%, #999); background-image: -moz-linear-gradient(top, #E5E5E5 30%, … | |
Re: What are you asking? How to develop the calculator in jQuery or where to learn jQuery? | |
Re: Could someone actually answer how to do this ourselves as I also want to change my username? | |
Re: Are you sure you are redirecting to the correct page as this information is conflicting: // the secret.php page is the page the user goes after he logs in successfully header("Location:member.php"); You say they are redirected to secret.php when logged in successfully but in your header location you are redirecting … |
The End.