-
Posts
14,780 -
Joined
-
Last visited
-
Days Won
43
Everything posted by .josh
-
are you running the script from a browser?
-
Well I have no idea what you're trying to accomplish with your query, so I can't really tell you where to put the parenthesis. But as far as order of operations: AND and OR are operators, just like +,-,* and / they are logical operators. So they have an order of precedence, just like math operators.
-
okay so humor me. If you change this: // Insert data that retrieves from "" into table "" $sql2="INSERT INTO $tbl_name2 (EMAIL, PASSWORD, CATEGORY, PRICE, TYPE, AREA, BEDROOMS, WATER, LAND, LIVINGAREA, AGENT) VALUES ('$email', '$password', '$category', '$price', '$type', '$area', '$bedrooms', '$water', '$land', '$livingarea', '$agent')"; $result2=mysql_query($sql2); } to this: // Insert data that retrieves from "" into table "" $sql2="INSERT INTO $tbl_name2 (EMAIL, PASSWORD, CATEGORY, PRICE, TYPE, AREA, BEDROOMS, WATER, LAND, LIVINGAREA, AGENT) VALUES ('$email', '$password', '$category', '$price', '$type', '$area', '$bedrooms', '$water', '$land', '$livingarea', '$agent')"; echo $sql2; $result2=mysql_query($sql2); } You're saying that the following echoes: and yet the data inserts correctly into $tbl_name2 ?
-
so you're telling me that when you echo out any of these: $email = $rows["EMAIL"]; $confirm_code = $rows["CONFIRM_CODE"]; $password = $rows["PASSWORD"]; $category = $rows["CATEGORY"]; $price = $rows["PRICE"]; $type = $rows["TYPE"]; $area = $rows["AREA"]; $bedrooms = $rows["BEDROOMS"]; $water = $rows["WATER"]; $land = $rows["LAND"]; $livingarea = $rows["LIVINGAREA"]; $agent = $rows["AGENT"]; nothing gets echoed, and yet the data gets inserted into the table?
-
$result1=mysql_query($sql1) or die(mysql_error()); put that on your queries. Any errors show up?
-
well if both are not echoing that means that your script was/is not working. There's no way it would not echo but be inserted into the new table. Are you sure the data wasn't already in the new table, maybe from some previous attempt or something?
-
order of operations. Need to wrap things with parenthesis, just like with math.
-
and if you echo out $agent or $sql2 it shows the expected data?
-
[SOLVED] Parse error: syntax error, unexpected ...
.josh replied to randallc's topic in PHP Coding Help
Nothing wrong syntactically wrong with that. Look in application_top.php -
did you check the column data type for the old vs. new AGENT column?
-
[SOLVED] I need to search an array for a string
.josh replied to refiking's topic in PHP Coding Help
yes. Dan wrote the preg_match as case insensitive so you do not need both in your array. It would be better for you to only have a single version in your array and the preg_match will check for web Web WEB weB etc.. but if that is not possible (ex: if this array is being generated) then remove the i modifier in the preg_match if (preg_match('#\b' . preg_quote($option, '#') . '\b#', $results)) { -
$nsqry = "SELECT * from `show` WHERE display = '1' ORDER BY `id` DESC"; $nsresult = mysql_query($nsqry); echo "<table><tr>"; while($nsrow = mysql_fetch_assoc($nsresult)){ $shows = $nsrow['name']; $image = $nsrow['image']; echo ($row % 4 == 0)? "</tr><tr>" : ""; $row++; echo "<td>"; echo '<img src="images/'.$image.'" width="150" height="150"> '; echo '</td>'; } echo "</tr></table>";
-
[SOLVED] dynamic updates without reloading page
.josh replied to gamblor01's topic in Javascript Help
AJAX is the term you want to search for. It is a javascript method to send requests to a server-side script, receive a response, and update content on the page (like changing a div's innerHTML) based on the response. -
I don't know what all it offers or what it takes to use it. I vaguely remember the file being called ssi.php or something along those lines and you could include it and call certain functions in it to get random things like how many users are registered on the forum, etc...but the last time i looked at it was like 4 years ago so even if I was remembering correct, that was a long time ago.
-
I'm pretty sure phpbb has a certain script file included in the install that acts as an interface for main site integration. Read their documentation.
-
How to set the page orientation to landscape for an excel file
.josh replied to AaronLuke's topic in Miscellaneous
that depends on the program you are printing from. -
[SOLVED] how to stop my shoutbox posting after i refresh page?
.josh replied to Robert Elsdon's topic in PHP Coding Help
send a token as a hidden input field. check for duplicates on post submission. -
Okay so the common theme here is stuff being inserted into the db.
-
FYI this same thing seems to be happening when I issue warnings. It goes through but it hangs forever.
-
ghostdog74 your solution would be great if the user was looking to remove all letters from a string. OP: Hopefully nrg's solution will work for you, but I have a sneaking suspicion you're probably going to have to show the content that that is going to be pulled from.
-
could always have both versions
-
I like it! But since the point of it is to convey either you don't have a crystal ball or else it's "in the shop" how about having it start out as is but then after a couple of frames it explodes or cracks in half or something?
-
Either one will work. I guess I'm kind of leaning more towards the first one though. Would be cooler if it were animated though.
-
is that lightbulb one supposed to be the psychic smiley? I hope not...that to me represents a "hey, i have an idea" or "hey, there's an idea" smiley