342 Posted Topics
Re: try it this way: [CODE] $sn = mysql_real_escape_string($_POST['SiteNumber']); mysql_query("DELETE FROM UserSites WHERE SiteNumber=".$sn); [/CODE] | |
Re: [QUOTE=tunde011;1103744]I have a table that accepts article and email from a user and another table that accepts the name and comments from another user. I want the first user(the person who post the article to recieve email that someone has commented on the article. I will appreciate it if you … ![]() | |
Re: I don't know what your database struce is, but theis line looks wrong to me. [CODE] <td align="center" ><input name="checkbox[]" type="checkbox" id="checkbox" value="<?php echo $row['reviewID']; ?>"/></td> [/CODE] Just like when you loop through checkbox to get the the value, you will need to loop back though an echo again when … | |
Re: ? Archives are usually used for disaster recovery! That is such a genaral question, i don't think ther is an answer. | |
Re: maybe Javascript would be better if it is to be updated by the user before submission? | |
Re: I dunno, post like this disturb me a bit , since you are not thinking at all, but just ask others to do the work for you. anyway, here is the the way you set the start and end: Modifying the previous answer:.. [CODE] <?php var $start = 3 ; … | |
Re: [CODE] <?php print "Your name is ". $_POST['name']; // follow this with the others print "<br />"; print "You are ". $Age . " years old"; print "<br />"; $old = 25 + $Age; print "In 25 years you will be " . $old . " years old"; $Name= ("name") … | |
Re: [QUOTE=LloydFarrell;1100652]Hi, thanks for replying, What im trying to do is, from the $DOB_y $DOB_m $DOB_d given by the end user, i am trying to automatically populate a textfield called "starsign" as the user inputs thier DOB - Once the user has entered the month and day of birth, the text … | |
Re: You got carried away with the || on line 23 of thank_you.php remove the || just before the brace. | |
Re: I noticed that you are using mysql_fetch_array , which is numericbut you are calling it out as an associative array . try: [CODE] while ($row = mysql_fetch_assoc($sql)); [/CODE] if this still fails, there is always my old friend var_dump. try: [CODE] var_dump($row); [/CODE] to see if anything is there in … | |
Re: Two things: 1) use code tags 2) you are missing all of the braces in this section: [CODE] if ($result=mysql_query($sql)) //problem starts here echo '<p>nice</p>'; else echo 'good shit'; $row = mysql_fetch_row($result); //echo"$row[0]"; // $par= $row[0]; // this will contain the string containing the parameters $par= explode (",",$row); echo " … | |
Re: try moving that directory somewhere below or in public_html (doc root). Then access it there. | |
Re: Then you need it to be global and static? If you are doing stuff on the fly, wouldn't Javascript be a better choice? | |
Re: Yes. That is more of an HTML thing. use a series of <select> tags with 0-9 drop downs . Another for polarity. Pull it all together with PHP on submit . | |
Re: Not sure what you are doing , but perhaps you need a return statement for the current object pointed to by the the $this pointer? If you don't need a return value, try not using the pointer just to do background variable setting. I don't know if this applies to … | |
Re: Don't know where exactly the issue is, but that while statement scares me. The error means that there is something wrong with the query result. you might also try just setting $rs outside the the while and doing a var_dump($rs) just to see what's there. Maybe the problem is all … | |
Re: I'm curious . If you are new to PHP and SQL, how did they assign you a project like that? 1)You would have to know what the db structure is . 2) there has to to be a permissions table to save the permissions. 3)the admin page would create a … | |
Re: What's your point? Hire Indian programmers? Are you looking for a job? I don't understand...must be a language barrier! | |
Re: Try commenting out sections of your code. until the error stops. Sometimes there is a PHP "grammatical" error that does not cause a normal error, but crashes php none the less. It's happened to me on occasion. I think a rouge tick mark will do this in certain instances. Are … | |
| |
I just went all through the PHP manual and can't find what i need. A form has a dual function where it will display dates from mySQL if they exist in US english date format m/d/y. strftime() works fine as long as there is a date argument. When i display … | |
Re: Man, this thread is making my head hurt! The long and short of it comes down to: MySQL has it's own date time format. There is no way to change it. PHP has all of those functions just for such occasions. You can use strftime() to format the date the … | |
Re: try this: [CODE]$val_d = $_GET['val_d']; $sql = "SELECT * FROM device"; $sql .="WHERE device_num LIKE ". $val_d;[/CODE] | |
Re: [QUOTE=ayesha789;1089953]I use one table for storing all values and my problem solved. But using left join its a problem.[/QUOTE] You are using a numeric array, which makes it very difficult to follow if one does not know the table structures. (even if you do!) Could it be that you are … | |
hello, I am S L O W L Y working through learning/writing a JS project. here is the core issue.: [CODE] var pt =<? echo json_encode($prt);?> alert(pt) // for diagnostic purposes [/CODE] json is flattening the PHP array to be used in the script. However, the alert shows me that … | |
Re: [QUOTE=undgerman;1083087]Hello,i have a question.I am designing a web application and here is a screenshot in png.[url]http://twitpic.com/uc9ha[/url] My question is,i want the email and password form fields to bie as big as i have indicated.What css do i need to have to make them to be of that size?. Thank you.[/QUOTE] … | |
Re: Did you start writing anything yet? There are submit functions in JS. Did you take a look in w3 schools? Reams of JS info is there for the clicking. | |
I have found Javascript to be the most difficult language to find useful and CORRECT info on. Afterr working for several hours looking at various sites, I'm still somewhat stumped. All I know at this point is that these is a difference in the array formatting between PHP and JS. … | |
Re: I feel you pain! JS is one the most poorly documented languages that I have ever tried to use. W3 has the methods listed, but the demonstrations and explanations are not too good. JS does have methods for URL and string manipulation, but i haven't used any of them. Good … | |
Hello, I'm a neophyte to Javascript, but I need it to dynamically add lines to a form. I was able to cobble together this inelegant looking code below. It adds the row when called, but there are more attributes needed for this to be correct for the application. 1) need … | |
Re: You don't have a loop! The "if" executes the conditional, then drops out. You want to use "while". Get rid of totaldigits (unneccessary). test for a remainder of 0. | |
Re: Reading this post reminds me of the old IBM motto: *THINK* Also, the analogy of a man standing amidst lumber, nails, and carpentry tools asking: " What now?" ;-) | |
Re: what is it"not doing"? Did you check the error log? What error do you get? | |
I have searched the web, the PHP manual and checked some reference books, but I can find any satisfactory answer to my question. Perhaps It my poor grasp of the constructor concept and it's proper application? Here is the issue: I have a an existing class constructor definition that I … | |
On the advise of ~S.O.S~, i checked out code blocks. It's rather intuitve to use. (It has to be, the documentation is very limited.) The debugger works well with it. In fact i used the step function to find a place where i was stuck in a loop. The yellow … | |
Hello all, I got involved with a Joomla CSS project, but I know very little about the properties of CSS. I have found out the hard way, that it works by it's own rules which may or may not necessarily be a subset of the HTML tag that I am … | |
Re: Wow, I wouldn't do it that way at all! I was thinking that it was more of an indexed pointer thing. You know, start at i and loop n times. I believe a pointer would be faster than an array as well which is the third part of the "challenge". … | |
Re: No, actually what he has is better form. "Using namespace" is quick time saving tool that brings the entire std library into scope. It's OK for assignments, unless the instructor says otherwise. In "real world" programming this is considered namespace pollution! Just declare what you need... | |
Re: code::blocks is a good IDE If you just want to compile a program use the g++ compiler on the command line: g++ myprog.cpp -o myprog this will compile myprog.cpp source into myprog executable. To run it ; ./myprog | |
| |
Re: [QUOTE=Somerville;538967]lol i probly havnt looked into this enough, whats a GUI IDE[/QUOTE] Integrated Development Environment. Crimson editor is an IDE, but Codeblocks is a much better one, IMHO. I use it with the g++ compiler which is much superior to that Borland antique. This is especially important to someone who … | |
Re: [quote] Number x = /* ... */; ++x; // calls Number::operator++(), i.e., calls x.operator++() x++; // calls Number::operator++(int), i.e., calls x.operator++(0) [/quote] Seems to me that you answered your own question with the above. That IS the overload method. As they say: "It is what it is." You looked it … | |
Re: As an earlier inquiry, I was wondering where the savings variable is defined on this one. Is it part of the Account class? [code] Account Account::operator+(const Account &right) { Account temp; int temp2; temp2 = (savings + right.getchecking()); temp.setTotalBalance(temp2); return temp; } [/code] | |
Re: [code] if((month==2) && (day>=1 || day<=28 || 29) [/code] This snippet above might be problematic as well. Why not just make it <=29 and call it a day? Otherwise you will have to test for a leap year. | |
hello all, I have an old database that was written for xenix 386 using the old a.out binary format. Since then most unix/linux OS s have adopted the ELF format. These binaries will not run on a modern OS. I don't have the source code, just the binaries. Is there … | |
Re: I'm coming in late here, but I have a question. If you are adding poly's with the same three terms, how do you end up with 9 terms? wouldn't you have the same three, but just more or less of each at the end of the addition? | |
Re: [QUOTE=Exo1337;533571]The answer needs to be in integers ^^;[/QUOTE] That's the ANSWER. The calcualation must be done in doubles. your first situation is setting an integer equal to a double for yards. It's undefined from get-go. Also you will get a double in the the yards calculation unless the number generated … | |
Re: why not define numerset as a float? it will take an integer too. | |
Re: Are you directly connected ? No router or gateway? I used to have a Dlink router that used a free DDns server at Dlink. The router would report the new address to the server, so it always pointed my box. It used an address like [url]Http://dlinkddns.mysite.com[/url] |
The End.