Maq
Administrators-
Posts
9,363 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Maq
-
Check out this sticky: http://www.phpfreaks.com/forums/index.php/topic,277416.0.html
-
What's the error? Please use tags around code.
-
Please read this sticky: http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
-
What up babyT, welcome to the site. Where abouts in PA are you? Good luck with your web template!
-
If you're passing the value from the form the next page via POST, the 'delstag.php' your code should look something like: $Name = mysql_real_escape_string($_POST['thing']); if (!$result = mysql_query("DELETE FROM Stag WHERE Name = '$Name'")) { throw new Exception('Error: ' . mysql_error()); } else { echo $Name . " has been deleted."; } And yes, I meant the SQL. But your HTML should have quotes around attribute values as well.
-
www.php.net is a good one. You can subscribe to mailing lists as well.
-
First all you need single quotes around $name because, presumably, it is a string. See if that fixes the problem.
-
You have to use two separate value-of statements. Not sure if you literally wanted the comma between the two value, but if you do then uncomment the 'text' line. Not sure if you're using these variables anywhere else, in which case you would keep them in variables, but if not you can just use the value-of and select the var elements.
-
24, joined August 2008
-
Not sure what else you expect. Someone suggested JQuery, but it seems you didn't even make an attempt. Unless someone has already developed this replica, I'm confident no one is going to do it for you. Here are what seem to be helpful Google results: http://www.phpfreaks.com/forums/index.php?topic=201294.0 http://www.dynamicdrive.com/forums/showthread.php?t=31628 http://www.daniweb.com/forums/thread206476.html#
-
Depending on how/what you're trying to get, XPath might be better: http://us2.php.net/simplexml http://us2.php.net/dom
-
Your best bet is to Google for one. Those are the only replies you are going to get.
-
vinnier, it's almost impossible for us to help you without some sort of code or description of the problem. You have to narrow down your problem, what exactly does, "it messes up the website completely" mean? Can you provide a screen shot or link?
-
The main reason is if you ever want to port your code elsewhere and that server has short_open_tag disabled, your code will not work.
-
webguync, please do not use shorthand PHP tags, use <?php instead. You also shouldn't be killing your script if a query fails, instead, handle it properly. Read more here.
-
You mean nuts? And you're welcome
-
To answer your question, you are nuts.
-
We have rules...?
-
The $195 is a one-time fee. You can run it for as long as you want. Upgrades for the current version is free. For the next version, you get a discount, but you still have to pay for it. Support is an annual fee of $80. Thank you for the answers Btw have you used vbulletin? I have been hearing that the admin control panel on vbulletin is much better than phpbb. Is this true? They both have demos, admin and user perspectives.
-
You can supply str_replace with an array of words you would like to replace and dynamically give it the replacement string. Check out example #1 on that page. If I understand you correctly this is what you want to do. You should try to avoid regex string functions unless you absolutely need them.
-
Sorry, my code was erroneous. Try this: $object=trim($_POST['object']); echo $object; $reg = '#width="[0-9]+" height="[0-9]+"#i'; $rep='width="400" height="319"'; $object=preg_replace($reg,$rep,$object); echo $object; Took out the '/' from the regex. We don't need it because we're using the '#' as delimiters. Also, when you're displaying error_reporting you should put it at the top, because anything above it will not be parsed.
-
Try: $reg = '#width="[0-9]+" height="[0-9]+">#/i'; This means, "match one or more digits inside the quotes" and the /i is for case insensitivity. Before you were using: [^"]* which doesn't really do anything. It literally translates to, "match zero or more not quotes". You may even get an error.
-
You need to use regex, have a look at preg_replace.
-
You could always put an electric fence around it.