889 Posted Topics

Member Avatar for jay_412

Days are simple, take a look at the date() function in the documentation at [url]www.php.net[/url] for more info. What do you mean by visibility? Of the days?

Member Avatar for darkagn
0
78
Member Avatar for hmkk

Hi hmkk and welcome to DaniWeb :) [code=php] mysql_select_db($sumdueu_urworld, $sumdueu_admin); [/code] Your problem is most likely that the variable $sumdueu_admin has not been created correctly. This must be done with a call to mysql_connect() before the call to mysql_select_db() is made. This can occur in a previous script in your …

Member Avatar for darkagn
0
302
Member Avatar for Mujahid158

Hi Mujahid158 and welcome to DaniWeb The mysql_query function returns a result set resource for select queries. You can't access it in the way that you are attempting, you need to specify the index of the resource. Like so: [code=php] echo $mem["username"]; [/code] For further information on the function, please …

Member Avatar for Mujahid158
0
81
Member Avatar for Enthused

There are a few ways you can do this, but the simplest is probably to pass the variable via GET. To do this add the following line of code after you set $errorpas: [code=php] header("Location: User.php?errorpas=$errorpas"); [/code] Then at the top of your User.php script add the following lines: [code=php] …

Member Avatar for Enthused
0
309
Member Avatar for darkagn

Hi cscgal (and other site administrators), I recently received a PM from cscgal asking me to fill in an online survey. I was willing to do so, but just before I pressed the Submit button, I wondered if maybe her account had been hacked by a spammer. Does anyone know …

Member Avatar for Chaky
0
174
Member Avatar for vairvixen

Is there another variable with the name $results in your code or in an included file? Also I think you might want to use >= and <= rather than > and < in your comparisons.

Member Avatar for darkagn
0
113
Member Avatar for coolest_987

Not sure if this is your problem but have you restarted your webserver after installing the GD extension?

Member Avatar for cwarn23
0
194
Member Avatar for hawashafiq

I would have a single table, called user_pref, which would have the columns user_id, product_type_id, both of which would form the primary key for the table. If the user selects pets as a preferred option, add their user id and the pets category's id to the table. If the user …

Member Avatar for hawashafiq
0
149
Member Avatar for crazy4fun

[QUOTE=rskelley;953800]Go to [url]http://www.php.net/docs/[/url] Start reading and start coding.[/QUOTE] I agree. Also there are tons of tutorials and code samples available on the web. Google is your friend.

Member Avatar for crazy4fun
0
152
Member Avatar for BobLewiston

There are a few different types of SQL, but [url]http://www.w3schools.com/sql/default.asp[/url] is a good site for general SQL knowledge. [url]http://www.sql.org/sql-database/sql-tutorial/[/url] is a good beginner's tutorial but it is a little slow-paced for my liking - if you have programming experience you may feel the same. SQL is not too difficult when …

Member Avatar for darkagn
0
91
Member Avatar for ramesh_

If you mean a text box to type your title into, then you need to use an input tag of type text for a one-line box or a textarea tag for a multi-line textbox. If you are after a select box that you can type in, that will require some …

Member Avatar for darkagn
0
76
Member Avatar for iamjmurphy

Hi iamjmurphy and welcome to DaniWeb :) Can you please provide more information of your table structures and which fields you are trying to compare? It seems like it should be a fairly simple task, but I'm unsure exactly what you are trying to achieve. Cheers darkagn

Member Avatar for iamjmurphy
0
80
Member Avatar for watchinthegame

Hi watchinthegame and welcome to DaniWeb :) This is a bit odd. Can you please post your SQL query that you are using to update the record so we can take a look? Cheers d

Member Avatar for elbiggame
0
91
Member Avatar for PatMcC

Hi Patrick, Unfortunately it is not as simple as that. Different languages are better at different tasks. Most are designed to perform specific tasks at first and grow from there. Really what you need to do is work out what you are trying to achieve and then select the best …

Member Avatar for xeolabs
0
235
Member Avatar for viniciusweb

Well, technically yes. A better solution would probably be: [code=php] if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1') { // request comes from this server } [/code] but even this would probably not be too safe. What are you trying to achieve by knowing the request was from the server?

Member Avatar for viniciusweb
0
91
Member Avatar for Mapper99

[code=php] $desc->lastname = "Penner"; [/code] I believe your problem lies with this line of code. If you echo $desc to screen I think you will find that it relates to the lastname tag, not the user tag, so it is inserting a child of the lastname tag which is not …

Member Avatar for Mapper99
0
270
Member Avatar for CFROG

[code=php] $send="INSERT INTO mailbox SET member_id='$memid', user_name='$$_SESSION[user_name]', user_id='$_SESSION[user_id]', message='$message', inbox='NEW', subject='$subject', date='$dsub' " ; $save_result=mysql_query($save); [/code] What is $save? I think you are trying to run the query $send?

Member Avatar for CFROG
0
170
Member Avatar for scarypajamas
Member Avatar for mzprog

The GridBagLayout is possibly what you will need. However, it is possibly the most advanced of Java's standard layouts. It gives you full control over margins (Insets) which gives great control over alignment issues. A google search should provide plenty of examples of the use of this layout.

Member Avatar for BestJewSinceJC
0
287
Member Avatar for dorkwad

Basically the way that it works is everything after the ? is a set of key-value pairs. So, if you need to find $_REQUEST["msg"] you need the URL to read [url]http://xxxxx.php?msg=zzz[/url] Hope this helps, darkagn

Member Avatar for dorkwad
0
105
Member Avatar for itisnot_me

[code=php] if(51 < $bal && $bal < 75) [/code] This statement reads "if $bal is GREATER THAN 51 and LESS THAN 75". If you have $bal EQUAL to 51 it is not GREATER THAN 51. (Sorry for the shouting, but it is necessary to emphasise my point). What you need …

Member Avatar for itisnot_me
0
82
Member Avatar for SamSam2020

Yes, with care. Always perform checks on session data to maintain security and integrity. For example: [code=php] $goal = $_SESSION["goal"]; if (strlen( $goal ) < 1) $goal = "Not set"; [/code] Just a simple example, but you get the idea...

Member Avatar for darkagn
0
49
Member Avatar for Toxikr3

Change $_GET[user] to {$_GET['user']} (including the braces). An even better way would be: [code=php] $user = $_GET['user']; if(strlen($user) == 0) { echo "No user"; die; } $query = "INSERT INTO friendrequest (username,by) VALUES ('$user' , '$by')"; [/code]

Member Avatar for Toxikr3
0
145
Member Avatar for CFROG

You are overwriting your $sql variable with the second statement. Try running the first SQL statement before you set the $sql variable, or you could change your second statement to use a new variable, for example $sql2.

Member Avatar for CFROG
0
285
Member Avatar for mani11
Member Avatar for mashimaro

[QUOTE=mashimaro;908952] After years of coding all of a sudden I got a paper on "Authorization in instant messengers" to write. While creating a messenger and the authorization system isn't that big a deal, what can be written about it? It needs to be around 50 pages :/ [/QUOTE] So how …

Member Avatar for mashimaro
0
95
Member Avatar for alexstrong29

Hi alexstrong29 and welcome to DaniWeb :) If the recommended products are also in the products table, what I would do is add four columns to your product table that represent the product ID's of each recommended product for the row. That way your database grows by a lot less …

Member Avatar for germaine.tay
0
141
Member Avatar for kireol

There are two functions that you might find useful, [icode]in_array[/icode] and [icode]array_search[/icode]. Here is an example of their usage: [code=php] $employee = array(); $employee [] = array("name" =>"Chris Apple", "company" => "Acme inc.", "title" => "Developer", "salary" => "77000"); $employee [] = array("name" =>"Todd Orange", "company" => "Daves Dogs", "title" …

Member Avatar for kireol
0
158
Member Avatar for nish123

You can get the current timestamp from the [URL="http://au2.php.net/manual/en/function.time.php"]time[/URL] function and parse it to a date through the use of the [URL="http://au2.php.net/manual/en/function.date.php"]date[/URL] function. If you do this when the user logs in or out and store it in your database, you can then retrieve this information quite easily. Have a …

Member Avatar for Josh Connerty
0
3K
Member Avatar for BestJewSinceJC

I believe that Object one is your observer and objects two three and four would notify it when their data changes. So Object one is your listener, the other objects are models in the explanation you gave above.

Member Avatar for BestJewSinceJC
0
74
Member Avatar for darkagn

Hi all, I am fairly new to C# and WPF but I am super excited by the possibilities! I am currently experiencing an interesting problem with my project. Basically I have a MediaElement that displays a series of videos or images with transition effects between each of them. When I …

0
79
Member Avatar for scru

When you say you suck at math, how bad is it? Are we taliking about not knowing advanced calculus and algebra, or not knowing your times tables? Who are you comparing yourself to? [URL="http://mathworld.wolfram.com/"]This site[/URL] has lots of tutorials, demonstrations and explanations that might help you. I have used it …

Member Avatar for certifmix123
0
257
Member Avatar for Ancient Dragon
Member Avatar for nish123

You can use a combination of the [URL="http://au2.php.net/manual/en/function.substr.php"]substr[/URL] and [URL="http://au2.php.net/manual/en/function.strpos.php"]strpos[/URL] functions to achieve this.

Member Avatar for nish123
0
159
Member Avatar for mr_vodka

Hi mr_vodka and welcome to DaniWeb :) Love the username btw! :) If all you want from the budget table is the budget_name field, you could just try this: [code=mysql] SELECT fundinfo.fk_budget_ID, fundinfo.fk_tiertwo_ID, Sum(fundlink.fundlink_amt), budget.budget_name FROM fundinfo LEFT JOIN fundlink ON fundinfo.pk_fund_ID = fundlink.fk_fund_ID LEFT JOIN budget ON budget.pk_budget_ID = …

Member Avatar for mr_vodka
0
126
Member Avatar for alias120

readData is not a public variable, so you can't access it by myInput.readData. Try this for your Input class: [code=java] class Input{ private String readData; Input() throws Exception { readData = ""; File inputFile = new File("/home/alias120/Desktop/School/CMIS 141/Project 4/input.txt"); Scanner input = new Scanner(inputFile); while(input.hasNext()){ String s1 = input.next(); readData …

Member Avatar for alias120
0
80
Member Avatar for m-hrt

Can you post your code for generating the ticket number and displaying it please? This might help us figure out where you are going wrong...

Member Avatar for m-hrt
0
103
Member Avatar for Jarmok

The way you have to think about PKs is how are the records in this table unique? Your first option says that each source will have one record on a given day (is this true?). The second one says every record is unique which of course is true but doesn't …

Member Avatar for bigakis
0
112
Member Avatar for roryt

I believe that the Dude was banned some time last week for posting spam outside the Geeks Lounge which he had been warned about many times before. Not sure what happened to RF though...

Member Avatar for jephthah
0
534
Member Avatar for totalnoob

[code=html] <input type="hidden" value="$autoid"> [/code] The error is in this line, you have forgotten to name this field, so it can't find it in the [icode]$_POST[/icode] array. Try changing to this: [code=html] <input type="hidden" name="autoid" value="$autoid"> [/code]

Member Avatar for totalnoob
0
107
Member Avatar for sreya.n

The function array_search retrieves the key for a supplied value in an array if found, or false otherwise. This means that you can use it to search any array that does not contain boolean values. So, to search your array I would do the following: [code=php] $arr = array(1 => …

Member Avatar for nav33n
0
86
Member Avatar for santhanalakshmi
Re: PHP

If you are using a MySQL database, you can easily limit the returned results in a query with the use of the LIMIT function. For example: [code=php] $sql = "SELECT * FROM messages WHERE userId = $userId LIMIT(0,30)"; [/code] displays the first thirty records. If I had LIMIT(30,60) that would …

Member Avatar for darkagn
0
59
Member Avatar for martyulrich

Hi martyulrich and welcome to DaniWeb, Do you know what is meant by theta notation? If you show us that you understand the top-level theory we might be inclined to help you with the specifics...

Member Avatar for darkagn
0
35
Member Avatar for mzdiva041986

Sorry what was your question? It seems to have been chopped because of the lack of spaces in it...

Member Avatar for BestJewSinceJC
0
74
Member Avatar for mveleli

Hi mveleli and welcome to DaniWeb :) That's exactly what we're here for. Please post any questions you have and include some of your coding attempts and we will try to help to the best of our ability. Happy programming!

Member Avatar for darkagn
0
39
Member Avatar for darkagn

Hi all, We are experiencing the following problem with the latest versions of IE and FF in regards to sessions. If anyone has encountered these problems before, any insight would be valuable. [B]In FF:[/B] An ongoing problem where sessions are saved across multiple tabs and windows in the same machine. …

Member Avatar for nutty2chat
0
237
Member Avatar for madeindadex305

>> You can google on Math.ceil() and Math.floor(). Math.ceil(double x) rounds x up to the next largest integer-equivalent number. So Math.ceil(1.5) returns 2.0. Math.floor(double x) rounds x down to the next largest integer-equivalent number. So Math.floor(1.5) returns 1.0. These statements are a little misleading. Math.ceil() does not round the result, …

Member Avatar for darkagn
0
126
Member Avatar for fitse

Do you want to create a separate forum for each language? Or do you want to translate the same forum to different languages? I think the latter would be much much harder...

Member Avatar for cwarn23
0
200
Member Avatar for 7arouf

One "drag and drop" PHP IDE that comes to mind is DreamWeaver from Adobe. I haven't used it much but from what I have seen I have liked, as it also allows you to create HTML, CSS, JavaScript and ASP files to name a few. I would also like to …

Member Avatar for BzzBee
0
314
Member Avatar for Summerston

Hi Somerston and welcome to DaniWeb :) You will need to join to the employee table twice to get the name for each column. Something like this should work: [code=sql] -- first select the columns required SELECT wo.id, em.name as submitted_by, emp.name as completed_by -- not sure if you can …

Member Avatar for Summerston
0
128

The End.