RichardRotterdam
Members-
Posts
1,509 -
Joined
-
Last visited
Everything posted by RichardRotterdam
-
Given your input I'd say open a text editor and remove the column but that's probably not what you mean. specify your problem a bit more such as: How do you wish to remove the column. When do you want to remove this column Where is this html table etc the more detail the easier someone can help
-
how i calling to script in js in php for ?
RichardRotterdam replied to kfir91's topic in PHP Coding Help
What's bigger picture here? It seems like you're trying to create a calendar from the looks of it. I think you're better of rewriting the whole thing in javascript or completely in php depending on the purpose of your script -
modal, lightbox, slimbox, dialogbox, multibox
-
this.className from element with multiple classes
RichardRotterdam replied to lindm's topic in Javascript Help
If you mean like in the following situation <div id="mydiv" class="class1 class2 class3"></div> <script> alert(document.getElementById('mydiv').className); </script> I see it alerts "class1 class2 class3" Either you can split that using split() or you could use a js framework which returns the class names as an arrray. I know jquery and mootools does this. -
Do you mean your ajax call returns a string? you could try json_parse() from json.org
-
look at the following url: 'to_db.php', That's how you usually set an attribute of an object in javascript however, you didn't start an object. now take a look at the following ajax code taken from the jQuery site $.ajax({ type: "GET", url: "test.js", dataType: "script" }); notice how it has $.ajax({ before type:"GET" that should prob solve your problem
-
Which PHP-Editor do you think is the best?
RichardRotterdam replied to briananderson's topic in Miscellaneous
For simple scripts I use notepad++ or kate depending on which os im working on. For more serious projects I use eclipse. There is one thing im curious about a lot has changed since 2005 and more often I notice php developers switch to ide's instead of editors, is the percentage of users that use DW still this high compared to the other editors/ide's? -
You don't compile php though. What version php version shows up when you run: phpinfo(); Or do you mean that red lines are showing up in your ide?
-
If this is your query And this is what you know that leaves you with joines. I suggest you look up how to work with joins this site has a tutorial about that here http://www.phpfreaks.com/tutorial/data-joins-unions
-
Try looking for "javascript carousel" or "javascript slider" the one on the link you posted is build using jquery. Usually the ones build with a js framework(such as jQuery, mootools, prototype and dojo) are easier to implement and/or modify.
-
Uhm Are you sure about that??? http://lmgtfy.com/?q=mysql+foreign+%20key
-
With the given input I guess that could be your tabels yes. That's where relations come in using foreign keys i suggest you read up on that. The following could be your relations 1 User has many Pictures 1 Picture has many Comments
-
splitting a string into a string and an integer.
RichardRotterdam replied to dazman's topic in PHP Coding Help
Before you start coding It might be wise to answer yourself a couple of questions first. if you have the following string ADID00000001 You can check the following conditions: 1. Is it always the first 4 characters that are letters? 2. Is ADID a prefix that is always the same or can it have different letters. 3. Do the letters have a range of the alphabet or is it hexdecimal? 4. Is the second part of this string always an 8 digit string. Maybe there are a couple more of these but with that input you can code a whole lot easier. You also might want to look into regular expressions. It might be the way to go with this case -
I'd start with the entities before you start filling the fields. So far I see the following: Users Pictures Comments After you've done that you can set the relations and properties of these entities Is this correct so far?
-
Maybe this is a longshot but could it be that you're using an html 4 doctype? HTML4 isn't XML but SGML so it would be logical if that does'nt parse using the simplexml functions I did a quick test using DOMElement instead of simplexml You might want to try that. Here is the code test I did which might be usefull to you. <?php // put some html into the string $html $html=<<<HTML <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf8"> <title>Insert title here</title> </head> <body> <br> <div id="anassfullofninjas"><br><img src="someimage.jpg"></div> </body> HTML; // create dom element $doc = new DOMDocument(); $doc->validateOnParse = true; $doc->loadHTML($html); /** *get innerHTML of node */ $innerHTML = ''; $elem = $doc->getElementById('anassfullofninjas'); // loop through all childNodes, getting html $children = $elem->childNodes; foreach ($children as $child) { $tmp_doc = new DOMDocument(); $tmp_doc->appendChild($tmp_doc->importNode($child,true)); $innerHTML .= $tmp_doc->saveHTML(); } echo $innerHTML;
-
I don't see any semicolons ; use those to get rid of the errors
-
it shouldn't display the php tags at all. Most likely your not using a webserver. Are you running apache, IIS or any other webserver on your computer?
-
What is the code you have tried? and what do you mean with "it simply prints the php code as link"?
-
You could do this with php using $_GET. That way you can get the vars from the url.
-
The $() function in jQuery is the selector function which returns a single element or a collection of DOM elements it doesn't create a new element. http://docs.jquery.com/Selectors You can place <div id="register_respond"></div> in your html. That or use the jquery add function() , html() function or anything else to add html dynamicly
-
the following does not make much sense $('<div class="quick-alert">' + data + '</div>') the dollar function you mostly use as css selector if you want to use it to get an element by id use the following $('#register_respond').html(data); What should be the result btw?
-
In the following line change $image to $filename mysql_query ("insert into pix (imgdata) values('$filename')");
-
What is it that's not working? what method are you using for your form are you using the post method and are you using enctype="multipart/form-data"? <form enctype="multipart/form-data" action="uploader.php" method="post">
-
You find the following link usefull to solve your problem http://www.phpfreaks.com/forums/index.php/topic,95426.0.html
-
In your code I see the following two queries query 1 SELECT * FROM category query 2 SELECT * FROM sub_category WHERE sub_category_id = {$category['id']} Aren't sub_category and category both the same? I think you might be better of using 1 category table instead of 2. then you can simply use 1 query instead