- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
32 Posted Topics
Re: The id element is usually something controlled by the database not by the php code. You would need to have an id column in the database set as primary key with the "auto-increment" value set. Then, after running your insert query, you can use mysqli_insert_id() to get the id of … | |
Re: I think you are looking for echo. So something like echo ‘<a href=“‘.$l_filename.’”>click here</a>’; | |
This is not what I would consider a critical question but it has been bugging me a little. If I have a number of mysql queries that I drop directly into an array because there is only a single result. Doing so uses a line of code such as this … | |
Re: you are basically asking for a method to perform conditional column selection based on the column value. This is not something that can be done within a pure MySQL statement to the best of my knowledge. My suggestion would be to run the mysql statement to selecting all columns that … | |
Re: Your issue might be related to them .item class not having positioning. try adding position:relative; to your .item I would also consider positioning elements absolutly within the relative .item so this correction would be needed as well .ad_info { position:absolute; bottom:230px; } | |
Re: This will assign an array called categories with the keys being the cat name and the values being the count of records that match that category. <? $result= mysql_query("SELECT * FROM ray, hello,category WHERE ray.hello_id = hello.hello_id AND hello.category_id = category.category_id AND category.category_id= '1' "); while($row=mysql_fetch_assoc($result)){ $categories[$row['category_name']]+=1; } ?> Then … | |
Re: Check for other CSS related to the <a> tags in their hover state. This looks like it could be a border issue or maybe a padding issue. If there are other css styles effecting the a:hover then you will need to reverse them for this nav element in it's hover … ![]() | |
![]() | Re: I would try eliminating the margin definition from the icon style all together. You would then make specific classes to control the margins in the various locations. IE .icon-sidebar-margin{margin:10px} ![]() |
Re: in order to use the loop method you need to fisrt have an array of you image file names. then you loop through them with a foreach to eliminate the unwanted photos. I have used this technique many times $images=array('1.jpg', '2.jpg', '3.jpg'); foreach ($images as $image){ unlink($image); } Or in … | |
Re: Agree with Rotten. I would suggest first thinking about the text messages that will be sent to the system. How would they be structured? What questions need to be answered? This will let you know how to structure the database so that it provides answers that match the questions. Your … | |
Re: I am a little confused on what your are trying to do but in order to set the focus of an input element given the id for that input you would use something like document.getElementById('your_element_id').focus(); | |
Re: I do not think there is a way to handle multiple row updates in a database from a single query. I understand that you are concerned about the speed of the loop but this is not where the bottle neck would happen. Lets say you had 2000 records to loop … | |
Re: I would suggest timestamping the moment the person is supose to be released from the hospital in your database. Then you would compare the current time with the stored time to determine how much time is left if any. something to this effect: (using your code starting on line 49) … | |
Re: a few posibilities. -check the permissions on both the source and destination folders. Make sure php can write to these. -It might have to do with the destination not being complete. for your target try [CODE]$target=$_SERVER['DOCUMENT_ROOT'] . "/avatars/" . basename( $_FILES['file']['name']);[/CODE] | |
Re: or as a much simpler method you just need to change your input type from "button" to "submit" | |
Re: i use the following quite frequently to modify my dates. [CODE] $newTimeStamp=strtotime(date('m/d/Y H:m:sA', $oldTimeStamp) . " + 4 hours"); [/CODE] I find this to be fairly quick and easy when programming cause it is a single line. | |
Re: Agree with Mathieu. you have no Post var coming from the form called 'submit'. Change the if statement at the top of your update processing page. I would suggest using this instead of the isset() that you have there now... [CODE] if ($_POST['update']=="Update"){ //the update code... } [/CODE] This would … | |
Re: agreed... Please at least separate the pages into different code blocks. Regardless, looks like you are missing the name attribute for your delete dropdown list. This would be required in order to pass the desired delete value onto the page that processes deleting. Also, you need to work on the … | |
Re: I agree with ardav. PHP is processed by your server before the page is ever sent to the user. Javascript on the other hand is processed by the visitor's computer. Because of the nature of these languages PHP will ALWAYS execute before JAVA. THerefore java can never pass a variable … | |
Re: guess I'll throw my two cents in, though it may be a bit late. My approach would be to set the exam end timestamp in a php session var by adding the total number of seconds allocated to the test to the current time at the start of the test. … | |
Re: check the order of the final statement in your ajax file. It should read [CODE] mysql_query("INSERT INTO users (`user_name`, `user_pass`, `user_email` , `user_date` , `user_level`) VALUES('$user_name', '$user_pass', '$user_email', NOW() , 0)") or trigger_error(mysql_error());[/CODE] Or my personal preference is as follows for query structure. [CODE] mysql_query("INSERT INTO users SET `user_name`='$user_name', `user_pass`='$user_pass', … | |
Re: I had a similar need a few months ago and instead of writing my own script I found a GPU php class called pChart. This little class really has a lot of options to allow for image control. The only downfall on this script is the processing time. For my … | |
Re: [CODE]<?php //create_cat.php include 'connect.php'; include 'header.php'; if(isset($_SESSION['signed_in']) == false || isset($_SESSION['user_level']) != 1 ){ //the user is not an admin echo '<br/>'; echo 'Sorry! You have to be <a href="/signin.php"><b>logged in</b></a> to view all the <a href="signup.php" title="Become a registered user!"><b>registered</b></a> members.'; echo '<br/><br/>'; } else{ echo '<h2>Registered users:</h2>'; $sql … ![]() | |
Can anyone tell me if the following query can be done? [CODE]mysql_query("SELECT a, b, (a+b) AS c FROM table WHERE c=1");[/CODE] When I try this I get an unknown column error for c. In order to get the query to work I have had to do this [CODE]mysql_query("SELECT a, b, … | |
Re: [CODE] <?php //connect to database mysql_connect('localhost', 'rian', 'ri0401') or die(mysql_error('Could not connect')); mysql_select_db("test") or die(mysql_error('Could not select database')); //Identify verubles $make = $_POST['Make']; $price = $_POST['Price']; //query $sql=mysql_query("Select * From test Where Price <= '".$price."' AND Make Like '%".$make."%'") or die(mysql_error()); while ($row=mysql_fetch_array($sql)){ echo $row['Make']; echo '<br/>'; echo $row['Model']; echo … | |
Re: why use a loop to find the user info? why not just grab that specific user's data from the table in the first query [CODE] $result=mysql_query("SELECT * FROM mytable WHERE Email = '".mysql_real_escape_string($myMail)."' AND Password='".mysql_real_escape_string($mypassword)."'") or die(mysql_error()); if (mysql_num_rows($result)==0){echo "user not found";} else{ $user=mysql_fetch_assoc($result); echo $user['Name']; } [/CODE] | |
Re: It looks like you are trying to reference the result of the first query in the second but without converting the first query itto an array first. Maybe try this for line 2 [CODE] $subject=mysql_fetch_assoc(mysql_query($QUERYsubject)) or die(mysql_error()); [/CODE] | |
I have a bit of a stumper that I am hoping someone has a fresh idea on. [B]The Problem:[/B] I have a client that owns 3 domains all selling similar products. The domains are all very interlinked together for various SEO purposes. I need to be able to have a … | |
Re: That looks correct for your first request. on the second, I am not aware of a way to do this. You cannot use any of the greater or less than opperators because the data isn't numeric. I would suggest changing this cell to an integer and if you need the … | |
Re: [QUOTE=Simon180;1667624]abit like the title am looking for a way to scan my full database and to look at each accounts email address and to find any emails the same and then count them can anyone show me how this is done ? thanks below is my basic db table [CODE] … | |
Re: It sounds like your content stored in the $comments var might have had html_entities() applied to it. in this case your text string actually looks like >br /< which when displayed in a browser would show as <br /> Check for an html_entities function upon storing the data. If you … | |
You will have to excuse if this question seems stupid but while I am a fairly skilled PHP developer I am a total newb when is comes to apache and server config. I am trying to have a single page accept all the request for directories on my site unless … |
The End.