79 Posted Topics
Re: You need to create a connection first. Look at this link and see that the perform a mysql_connect(...) before the mysql_query. [url]http://www.w3schools.com/php/func_mysql_query.asp[/url] | |
Re: You should look at approaching this from a different perspective. You are not going to be able to access the ID attribute in the called PHP program. What you are going to need to do is build a link (either in a button or just text) that passes the information … | |
Re: You could save the primary key in hidden fields on the web form after the initial save. If the value of the primary key is null or blanks (which is an invalid value for a primary key) you know that the record needs to be inserted. If it contains a … | |
Re: Instead of putting the SQL Statement in the mysql_query() function, put it into a variable and echo out that string so you can see the actual SQL statement that is being passed. [CODE] $sqlStmt = "UPDATE resume SET name='{$_POST['name']}', age='{$_POST['age']}', sex='{$_POST['sex']}', mobile='{$_POST['mobile']}' WHERE id={$_POST['id']}"; echo $sqlStmt; mysql_query(sqlStmt);[/CODE] If you cannot … | |
Re: Will the code really throw a 'multiple declaration error'? It has been a long time since I programmed in C, but I thought that there would just be two declarations for 'a', one global and one local to the for loop? Basically the global declararion would be ignored in favor … | |
Re: Since you are filling the Select Box with the Unit of Measeure data from your database why not have the value attribute contain the calories for each of the different unit of measures. That way you can easily update the information on your page using javascript and not have to … | |
Re: It looks like you are not closing your second function properly. [CODE] function wordCheck($data, $fieldName) { global $errorCount; if (empty($data)) { displayError($fieldName, "Please enter $fieldName"); $retval = ""; } else { if (preg_match("/^[a-z]+$/i", $retval)==0) { displayError($fieldName, "Words must be letters only"); } return($retval); } } [COLOR="Red"]// <======= Missing this closing … | |
Re: Tha handles [B]cmdSend.cmdSend.Click[/B] is not right it should only be [B]cmdSend.Click[/B]. I am not sure how it got this way. Try taking out the first [B]cmdSend.[/B] and see if that helps | |
Re: When you set up your SQL statement add a WHERE clause to restrict it to the current user. let's say that the logged on user is in the $user variable. you would code it something like this. [CODE]$sql = 'SELECT * FROM data WHERE userID ='" . $user ."'"[/CODE] You … | |
Re: At the end of the statment you are escaping the two single quotes. I think that you only need one of them to complete the onclick code and I do not see anywhere else in the code where the single quote is escaped. | |
Re: Create a date data type. Set it to the initial value. Use in in while stmt incrementing the date with the DataArr function [CODE]NextDay = DateValue(DateStart.Text) LastDay = DateValue(DateStop.Text) While NextDay < LastDay NextDay = DateAdd("d", 1, nextDay) ' ' [I]' Your code to process each date[/I] ' ' wend[/CODE] | |
Re: Since your ID does not uniquely identify a state or a city but rather a user's comment you will have to change your thinking a bit. You should actually read about normalizing a database, but you could get away with the following code: try [CODE]SELECT DISTINCT state FROM comments ORDER … ![]() | |
Re: I am assuming that this PC is at your house and that you have a high-speed network. [LIST=1] [*]You need to get your ISP to assign you a static IP. Most ISP's use DHCP so you cannot be guaranteed a consistent IP address otherwise [*]You should assign a static IP … | |
Re: You could use a subselect on the insert. INSERT INTO "table1" ("column1", "column2", ...) SELECT "column3", "column4", ... FROM "table2" where column3 = $orderNumber You would then only need two inserts. One to populate the invoice header from the order header and one to populate the invoice detail from the … | |
Re: ASP.NET has a validation control that you can attach to the check boxes. What you need to use is the custom validation checkbox. I know that several of the validation controls generate client side and server side validation. I am not sure if the custom validation can does that. In … | |
Re: Is there a need... NO. But the toolkit and extension provides a lot of Ajax functionality to your web applications. | |
Re: [URL="http://netbeans.org/kb/docs/ide/mysql.html"]http://netbeans.org/kb/docs/ide/mysql.html[/URL] | |
Re: The Text boxes for check1 and check2 have the same name... The horse ID. If you view the resolved HTML of the web page you will see that they have the same name and form field names need to be unique. Since the text fields are not unique, they are … | |
Re: PHP variables do not exist between pages you will either have to use session variables, cookies or URL vairiable to pass the information back. The easiest might be to put the values into the URL. You would have to build your link for the return as follows: [CODE]$href = "AvailableRooms.php?dayArrive=" … | |
Re: In order to access php variables They need to be inside <?php ?> tags. Assuming that you have previously retrieved the correct row and that the $row now holds the data, you can use: [CODE]<a href = "mailto:<?php echo $row['sup_email']?>"></a>[/CODE] | |
Re: Your HTML button would look like this: [CODE]<input type="button" value='Uncheck' onClick="uncheck()" />[/CODE] At the top of your HTML in the head section place the following code: [CODE]<SCRIPT LANGUAGE="JavaScript"> function uncheck() { document.myform.box1.checked = false; document.myform.box2.checked = false; document.myform.box3.checked = false; document.myform.box4.checked = false; } </script>[/CODE] Make sure you substitute your … | |
Re: With Gmail I had to specify the port. I am not near that code right now but I believe it was port 465. | |
Re: In phpmyadmin you have access to an text box where you can enter SQL just place the SQL code for your federated tables there. Look for the tab that says SQL. I know my version has it (3.2.4) | |
Re: Have you tried the .Net function ToUpper or ToLower? Here is the MSDN information on the function. [URL="http://msdn.microsoft.com/en-us/library/system.string.toupper(v=VS.100).aspx"]ToUpper Documentation[/URL] | |
Re: If you change the Apache configuration to look at *:80 instead of 192.168.1.56:80 then [B]any[/B] incoming HTTP request, on port 80, will be processed by Apache. So, if you are using the browser on the local machine, localhost or 127.0.0.1 will work. If you are trying to hit it remotely … | |
Re: 1) Look at the LIMIT keyword in SQL You can specify the number records to retrieve and the starting record number. You can simply add your [I]page size[/I] to the start position on a Next request and subtract [I]page size[/I] for a Previous request. 2) If you are using the … | |
Re: The $con variable is only a local variable to your constructor method. When you reach the end of the method, your $con is no onger valid. It should be a class variable if you want to keep it around to use in your other methods. Since you are trying to … | |
Re: Here is a good site I have used before: [url]http://www.siteground.com/tutorials/joomla/[/url] | |
Re: I would change the SQL statement to use LIKE instead of REGEX. You can change the where clause as follows: From: [CODE]WHERE artist REGEXP '^[$mysortletter]'[/CODE] To: [CODE]WHERE artist LIKE '$mysortletter%'[/CODE] It might even be better on the database editor as it won't have to try and evaluate a REGEX expression. … |
The End.