No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
75 Posted Topics
Re: Hi, if you don't have the WHERE clause in your sql script, your entire table will be update, but if you don't see this you probably have some other errors. try use: mysql_query($sql) or die(mysql_error()); also try to use addslashes() function to escape some chars. ![]() | |
Re: Hello, the update command looks like this: UPDATE tbl_name SET col1='value1', col2='value2', col3='value3' WHERE some conditions comes here | |
Re: First of all, session_destroy() deletes everything you have stored on your session. if you only want to logout some user, simply use unset($_SESSION['user']) and after that redirect to the login page (or your index page). For this you can also use javascript to force redirect. | |
Re: // execute SQL Server store procedure function MsExecuteProcedure($procedure) { $proc = mssql_init($this->_db."..".$procedure); $rez = mssql_execute($proc) or die(mssql_get_last_message()); return $rez; } // function that adds a parameter to a SQL Server stored procedure function MsAddParameterToProcedure($procedure, $msParamName, $paramValue, $type, $output = null) { if(!$output) mssql_bind($procedure, $msParamName, $paramValue, $type); else mssql_bind($procedure, $msParamName, $paramValue, … | |
Re: maybe because your server is on the black list ... | |
| |
Re: Maybe your server do not accept remote connection. | |
Re: as long as i can see, the error is in this line of code: echo "<a\href="http://www.empowergroupusa.com/cambiolabs/extension/catalog/files/inspection_886.pdf </a>"; do something like this: echo '<a href="http://www.empowergroupusa.com/cambiolabs/extension/catalog/files/inspection_886.pdf">PDF file</a>'; or echo "<a href=\"http://www.empowergroupusa.com/cambiolabs/extension/catalog/files/inspection_886.pdf\">PDF file</a>"; | |
Re: you can do something like this: if(!isset($_POST['comment'] || strlen(trim($_POST['comment'])) == 0) // display the form again with error message | |
Re: Echo your query to see if this is OK. @whiteyoh - i think your code will return a mysql error because you're not enclosing variables value. your query will look like: UPDATE members SET username = lulu ; this way, mysql will look for a column named lulu to compare … | |
Re: You have to delete your record from database (sending the row id by POST, GET ...) and than refresh the page. Previous posts told you how to delete a record using mysql ... | |
Re: why don't you use PHP? | |
Re: Maybe you have an error in your query. I think your $contruct variable (the one used in query) is still null ... Try to echo the query to see exactly how it looks | |
Re: You want to delete all files from a folder, or want to delete files after x days from creation / last modified date? | |
Re: [QUOTE=Elehas;1241891]out of all of them i'd pick Drupal. Joomla is good and works pretty much the same way, but I think that the Drupal community is much larger. There are many user created modules and themes that you may download and integrate into your site for free.[/QUOTE] I don't know … | |
Re: maybe i don't understand your problem, but ... if you know the values for the other 3 columns i think you don't need to store the total. you can do something like this: select (food + clothes + groceries) as total from table. | |
Re: Do you get any kind of error? Maybe the condition comments.msg_id_fk = messages.msg_id actually returns one row ... check your data. another possible problem: are you looping through the records? | |
Re: You did not close the try "}" (just before catch) | |
Re: you can also put <tr><td> ... </td></tr> in your foreach (each record will be a row in your table) | |
Re: with foreach($_POST as $key => $val){...} in this block you can check if (and what) checkboxes are selected | |
Re: Stupid question: are you running your script on your localhost? if yes, do you have a mail server installed? ![]() | |
Re: try this: update cq_user set emoney = emoney + 10 | |
Hello, Do you have any idea how can i "read" the homepage of a website and then to create an image and display it. Best regards, Silviu | |
Re: the easiest way to see what or where you have errors is to use as much as you can mysql_error() command. if you want to see if your select command is wrong, you can use something like this: $rcheck = mysql_query($check) or die(mysql_error()); .... best regards | |
Re: you also can find a lot of samples on [url]www.php.net[/url]. | |
Re: You can use a switch statament, but you must also use "default" case | |
Re: Maybe your asp.net guy thinks that asp is more secure because it (pre)compiles the code. anyway a discussion about php vs asp.net will take too long and all you need is to finish your project. now, depending of what kind of project you have. if is just a small/medium site … | |
Re: Hello, I have tried your code and works fine.... Best, | |
Re: [QUOTE=Sheridan;619265]Hi: I'm not sure that this problem has a solution but here goes. I am retrieving a list of names from a database and displaying them on a web page. The list would have the form: Doe, John Smith, Harry Jones, Dan I want each name to be a hyperlink … | |
Re: For your second question: you do not pass $form_Id to the query | |
Re: Hello, Maybe i didn't understand very good your problem, but i think that the first think you should do is to force users to input text following a pattern defined by you (or at least to explain how to enter the text). to be clear, for example your provided text … | |
Re: It is very simple. on your submit (and insert into DB) event add few more lines to send e-mail to a specific address. for this, use [URL="http://www.php.net/manual/en/function.mail.php"]mail()[/URL] function. | |
Re: if you don't have the site already developed, try using Joomla or Drupal. | |
Re: you can try something like this: SELECT Column1 & ' ' & Column2 AS Name FROM .... | |
| |
Re: [QUOTE=nav33n;585178]You just have to check if $_POST['selectboxvalue'] is equal to the value of the option. If it is equal, echo selected, else echo nothing..[/QUOTE] If you want to do that this way, you have to pass the value to the other page. use $_SESSION or $_GET ... | |
Re: [QUOTE=hollystyles;553531]Wow! well how you can read 15 hours of ASP.NET getting started and surmise that merely changing the file extension of an HTML page is all that's required seems improbable. But what the hey. Ok you can't just point IE at an aspx page in your file system, an aspx … | |
Re: do you really think that somebody will read the whole code posted? | |
Re: You get that warning because, as the message said, you use an undefined variable. to be sure you don't get that warning, first try to initialize your variables and after that use them: $a = null; // do what ever you want with $a | |
Re: [quote] Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Applications/MAMP/htdocs/functions.php on line 73 No database selected [/quote] did you connect to your mysql server and select your database? | |
Re: If you're talking about Personal Web Server, try chancing the port for apache. | |
Re: Why do you want to do this? anyway, if you really, [B]really[/B] want to do this, you can do it on insert. when you want to save a new record, first you get the last ID, and when insert the new record, you increment it by 1. also, be sure … | |
Re: [QUOTE=mikki2;555512] [code] while ($row = mysql_fetch_array($result)) { echo "<p class='rc_textAreatext'><a href='viewprod.php?id=" . $row['prod_name']. "'>" . $row['prod_name'] . "</a> - " . $row['description'] . " $" .$row['price'] . "</p>"; } [/code] [/QUOTE] when you build the link for your product detail page, use $row['prod_id'] (or how your id column is named in … | |
Re: Hi, For displaying your url (as a link) in the message body: $body_message .="\n This is a message from <a href='http://www.your_domain.com'> http://www.your_domain.com</a>"; and do the rest as in your script. For sending to multiple address .... Let say that if someone wants to send to more than one friends, they … | |
Re: $data = explode("/",$HTTP_SERVER_VARS['PATH_INFO']); $id = $data[1]; $idimage= $data[2]; i think you don't have to do this. you simply get your values using $_GET["..."] | |
Re: Let me guess, you always get the value = "none". if so, you should change the value property to whatever you want to pass to the next page. also check you view() function to see if it works correctly ... | |
Re: [QUOTE=nav33n;558177]Why can't you have one textbox and store decimal values in it ? :-/[/QUOTE] Because he might be afraid of the floating point ?! :D as for field type ... float, double, decimal ([B]not[/B] integer). |
The End.