Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
4
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #1K
~31.6K People Reached
Favorite Tags

32 Posted Topics

Member Avatar for abu taher

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 …

Member Avatar for abu taher
0
179
Member Avatar for larry29936

I think you are looking for echo. So something like echo ‘<a href=“‘.$l_filename.’”>click here</a>’;

Member Avatar for larry29936
0
170
Member Avatar for ajbest

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 …

Member Avatar for pritaeas
0
112
Member Avatar for mogaka

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 …

Member Avatar for ajbest
0
167
Member Avatar for OsaMasw

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; }

Member Avatar for OsaMasw
0
151
Member Avatar for narai

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 …

Member Avatar for pritaeas
0
196
Member Avatar for dwlamb

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 …

Member Avatar for LastMitch
0
175
Member Avatar for randomkid73

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}

Member Avatar for randomkid73
0
119
Member Avatar for GraficRegret

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 …

Member Avatar for GraficRegret
0
280
Member Avatar for LeslieJohn

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 …

Member Avatar for ajbest
0
545
Member Avatar for divyakrishnan

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();

Member Avatar for ajbest
0
124
Member Avatar for aoi.serizawa.9

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 …

Member Avatar for ajbest
0
318
Member Avatar for hunterious.latham

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) …

Member Avatar for ajbest
0
151
Member Avatar for Joemeister

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]

Member Avatar for jamied_uk
0
2K
Member Avatar for davy_yg

or as a much simpler method you just need to change your input type from "button" to "submit"

Member Avatar for Stefano Mtangoo
0
283
Member Avatar for vlowe

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.

Member Avatar for mschroeder
0
17K
Member Avatar for aecha

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 …

Member Avatar for Stefano Mtangoo
0
145
Member Avatar for rhodge09

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 …

Member Avatar for ajbest
0
413
Member Avatar for amulet_john

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 …

Member Avatar for ajbest
0
4K
Member Avatar for amulet_john

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. …

Member Avatar for ajbest
0
658
Member Avatar for Joemeister

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', …

Member Avatar for stanley87
0
3K
Member Avatar for 650U

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 …

Member Avatar for ajbest
0
438
Member Avatar for Joemeister

[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 …

Member Avatar for diafol
0
122
Member Avatar for ajbest

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, …

Member Avatar for pzuurveen
0
189
Member Avatar for Rian19

[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 …

Member Avatar for cwarn23
0
238
Member Avatar for phfilly

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]

Member Avatar for phfilly
0
171
Member Avatar for kitschkath

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]

Member Avatar for kitschkath
0
149
Member Avatar for ajbest

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 …

Member Avatar for ajbest
0
214
Member Avatar for -==Zero==-

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 …

Member Avatar for -==Zero==-
0
212
Member Avatar for Simon180

[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] …

Member Avatar for Simon180
0
112
Member Avatar for jpizzolato

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 &gt;br /&lt; which when displayed in a browser would show as <br /> Check for an html_entities function upon storing the data. If you …

Member Avatar for ajbest
0
114
Member Avatar for ajbest

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 …

0
124

The End.