
ngreenwood6
Members-
Posts
1,356 -
Joined
-
Last visited
Everything posted by ngreenwood6
-
Dropdown generated from Database information
ngreenwood6 replied to Ryflex's topic in PHP Coding Help
You are doing it now pretty much just forgetting to add the dropdown... try this: <?php $query = "SELECT NameFROM city WHERE member_ID = '$member_ID'"; $result = mysql_query($query) or die(mysql_error()); echo '<select name="dropdown">'; while($row = mysql_fetch_assoc($result)){ echo '<option>'.$row['Name'] . '</option><br>'; } echo '</select>'; ?> -
Do you know by chance if I can create a symbolic link on a shared server?
-
Ok so I think I solved your problem in about 10 mins (only took so longer because apparently the developer tools in the ie9 beta are not working properly). Anyways the problem you are having is because you are using ul elements. By default they have a padding / margin. In order for your elements to line up to each other it is 2 lines in the css file to correct it: on the .column class add this margin:0px 20px 0px 0px; padding:0px; the 20 is the right margin on the first column so there is a little spacing between them. If you wanted to you could make it less and it would be closer or more and it would be farther apart until it breaks. You could use the * hack on these if you wanted to only change them in ie7 but I think you should just change it and adjust for all browsers as that is the correct way to do it.
-
well, my guess is that since you dont have an idea of how to build one you dont know php all that well. If you want to learn how to build a shopping cart I would pick up some beginner php / mysql books and teach yourself the basics. Once you have learned the basics it will become clear how to build a shopping cart. You may also want to pick up some javascript / ajax books as well as you will probably want to use that for some things you are going to want to do with a shopping cart.
-
Just a suggestion. If you are having problems with ie7 you can use the star hack to override specific things for that browser. If you are unaware of it just google "ie7 star hack". Here is an example: /* firefox, chrome, safari, ie8 */margin:10px 0 0 10px;/* ie7 */*margin:5px 0 0 5px;
-
I would look into using a custom video player if I was you. Not everyone has quicktime on there computer but most people have flash. There are some free ones out there and they dont actually load until you click play unless you set them to autostart.
-
"SELECT * FROM col2 WHERE something = 'something' ORDER BY col2 ASC"
-
How to fopen() into a specific directory???
ngreenwood6 replied to galvin's topic in PHP Coding Help
np -
Have you tried adding mysql_real_escape_string() around your variable...dont know why that would cause an issue with the value you gave but it might be the problem and you should always use it anyway.
-
why dont you just store an array of all of the values in the cart? This way you can easily add/remove the items then when you want to display the items to the user you could just simply do: $cart_text = implode(',',$cart);
-
How to fopen() into a specific directory???
ngreenwood6 replied to galvin's topic in PHP Coding Help
Try this: $filename = $_SERVER['DOCUMENT_ROOT']."/tradepages/trade.php";$filehandle = fopen($filename, 'w') or die("can't open file");fclose($filehandle); This is assuming that /tradepages is right off the root of the server if not you will have to adjust. -
Ok so what I am trying to do is have multiple folders pull from one folder. So if I have this structure: /test1/some_folder/test2/some_folder/test3/some_folder I would want all of those folders named some_folder to read from a master directory. I dont need them to be able to go that specific url just need it to include the files from the main directory in each of those. Imagine I was setting up shared functions and just wanted to store them in one place but be able to include them on any site. I didnt know what to google (tried folder redirection but didnt seem right) so if anyone can offer a suggestion as to what to google or wants to provide an answer it would be appreciated.
-
I downloaded the ie9 beta and it is a step up in terms of javascript speed and html 5 support. However, my wife was trying to play a game on facebook and it was not working at all. When scrolling down the page it was flickering and all kinds of crazy stuff. Works fine in ie8, firefox and chrome. Its just another disappointment from microsoft. Google FTW.
-
I would add an is_numeric check to the id if they are always numeric to ensure valid data: if(isset($_GET['id']) && is_numeric($_GET['id']) && isset($_GET['del']) && $_GET['del'] == 1)
-
WHAT THE HECK! Ajax request only working once in a while??
ngreenwood6 replied to jwk811's topic in Javascript Help
Also you can take out all that headers crap its not needed. -
WHAT THE HECK! Ajax request only working once in a while??
ngreenwood6 replied to jwk811's topic in Javascript Help
I think that this line may be the problem: <select name="select_workout_routine" id="select_workout_routine" onchange="javascript:showWorkoutInfo(this.value);"> You dont need the javascript: part there but that shouldnt be breaking it. I think it is the this.value part that is. try changing that line to this: <select name="select_workout_routine" id="select_workout_routine" onchange="showWorkoutInfo(this[this.selectedIndex].value);"> -
Like I was saying before the only way to do that is by using ajax to send the request to the page without using a reload. However, If you are just looking for the user to return the the same page you could just use a redirect. For example: <?php//delete querymysql_query("DELETE something FROM something WHERE somthing='something'");//redirectheader("Location:index.php");?> All this does is it allows you to delete the entry but then redirect them to the same page so they dont notice where they went when they got redirected. Obviously you would have to change the location to the correct page. Another thing to keep is that you would want this code at the very top of the page because the header function can only be used before anything is out put is sent to the page.
-
WHAT THE HECK! Ajax request only working once in a while??
ngreenwood6 replied to jwk811's topic in Javascript Help
Can we see some of your code? Kinda hard to troubleshoot without anything to look at. -
Ok so I figured it out. It was my fault, apparently delete isnt a valid name for a function because it is already used I am guessing lol. Also you have to add the href attribute and just set it to javascript:void(0); (means do nothing). change it to this: $del_text = '<a onclick="deleteApplication(\'index.php?id='.$id.'&del=1\');">'; Then change the javascript functions name to deleteApplication instead of delete.
-
I believe what you are looking for is usort. Look at example 3 on this page http://php.net/usort. Please let me know if that helps.
-
Can you post your full code so that I can see where you went wrong?
-
I am not quite sure why you are using p tags but with divs this is very easily achieved. Instead of using aligns you would use floats. Here is a basic example: <div style="width:100px;"> <div style="float:left; width:50px; text-align:left;">Text Here</div> <div style="float:right; width:50px; text-align:right;">Date Here</div></div> I set widths on the divs so that the content would not overflow and push it down to the next line. I also had to use the text align property because of setting the width to 50px or the text on the right would be aligned to the left. You could extract the styles and put them in into styles if you wanted to. Hopefully that will help you get your desired result.
-
Same concept just a different method. If my assumption is correct this is coming from an echo statement. Try this: '<a onclick="delete(\'index.php?id='.$id.'&del=1\');"><img src="../images/delete_sm.png" title="Delete Application" alt="Delete Application" width="20" height="20" border="0" />' Then somewhere on that page add that javascript code that I previously posted outside of the php tags.