1,741 Posted Topics

Member Avatar for nav33n

In [this](http://www.daniweb.com/forums/thread131922.html) thread, I can see the first 5 posts. Then, all I see is an empty page. If the length of the text in code-tags is more, this seems to happen. First I thought it must be my internet. So, I reloaded the page and again, I see only …

Member Avatar for nav33n
0
129
Member Avatar for Suneetha Reddy
Member Avatar for nav33n
0
165
Member Avatar for ditty

[QUOTE=ithelp;645244]I do not think you will not find many people here who will spoon feed you everything to complete your homework, put some effort first.[/QUOTE] echo

Member Avatar for tanha
0
140
Member Avatar for blackbird29

[quote] You need to make a simple php/mysql interface that lets you updates values for a database. [/quote] ;) But his question is how to ?

Member Avatar for R0bb0b
0
504
Member Avatar for vaish.rajan

Then you need another form in the block of "edit". [code=php] echo "<textarea id='userInput' name=\"textspace\" cols=\"40\" rows=\"3\" >".$textspace."</textarea>"; [/code] So, when the user edits the form and clicks on submit, write the contents back to the file (or whatever!). Edit: Btw, its [code=language] (language = php, java, c, etc) and …

Member Avatar for vaish.rajan
0
8K
Member Avatar for rori

You can use [url=http://in2.php.net/htmlentities] htmlentities [/url] or [url=http://in.php.net/htmlspecialchars]htmlspecialchars[/url].

Member Avatar for buddylee17
0
304
Member Avatar for priddysharp

You need to post this question in javascript forum. I am sure you ll get better help there.

Member Avatar for shedokan
0
92
Member Avatar for ishlux
Member Avatar for ishlux

> sorry this is the code.............that was wrong <? session_start(); session_unregister('emailid'); session_register('emailid'); session_unregister('password'); session_register('password'); session_unregister('conpass'); session_register('conpass'); session_unregister('businessname'); session_register('businessname'); session_unregister('streetaddress'); session_register('streetaddress'); session_unregister('zip'); session_register('zip'); session_unregister('phoneareacode'); session_register('phoneareacode'); session_unregister('phoneprefix'); session_register('phoneprefix'); session_unregister('phonesuffix'); session_register('phonesuffix'); session_unregister('faxareacode'); session_register('faxareacode'); session_unregister('faxprefix'); session_register('faxprefix'); session_unregister('faxsuffix'); session_register('faxsuffix'); session_unregister('contactfirstname'); session_register('contactfirstname'); session_unregister('contactlastname'); session_register('contactlastname'); session_unregister('comments'); session_register('comments'); include("header.php") ?> <html> <body> <table width="960" border="0" cellpadding="0" cellspacing="0" align="center"> …

Member Avatar for Sanjay Sahu
0
83
Member Avatar for grr

[quote]$pet_list = mysql_fetch_assoc(mysql_query("SELECT * FROM ".$db_prefix."uberpets_pet_species")); [/quote] This will definitely return 1 record. [code=php] $result = mysql_query("SELECT * FROM ".$db_prefix."uberpets_pet_species"); while($row = mysql_fetch_assoc($result)) { $pet_list[] = $row; } [/code] Notice the use of while :)

Member Avatar for grr
0
118
Member Avatar for akshit

1. How are you determining whether the user is a student or the teacher ? Do you have a form where the user selects whether he is a student or a teacher ? 2. If you have a dropdown in page1 where the user can select what type of user …

Member Avatar for nav33n
0
171
Member Avatar for macneato

Are you storing these courses in a table ? [quote]Excel 2003 Level 1 Excel 2003 Level 2 Excel 2003 Level 3 Excel 2007 Level 1 [/quote] If yes, then, just pass the id of the clicked course in the query string of the popup, query the table and fetch the …

Member Avatar for nav33n
0
125
Member Avatar for AnilChowdary

I haven't used it, so I can't say much. But yeah, it is possible according to [url=http://www.php.net/manual/en/faq.languages.php] Php.net [/url]

Member Avatar for nav33n
0
64
Member Avatar for Shanti C

Use [url=http://in2.php.net/manual/en/function.mysql-real-escape-string.php]mysql_real_escape_string [/url] for user inputs, If the input is an integer, check it with [url=http://in2.php.net/intval]intval. [/url]

Member Avatar for Shanti C
0
287
Member Avatar for ashercharles

Keep a button ("back" or something) and on click of that button, submit the page back to registration page. Then to retain the values, you can put $_POST['fieldname'] for all the fields.

Member Avatar for Shanti C
0
78
Member Avatar for Shanti C

Have an array, put the question numbers (or ids) you have viewed in the array. Keep the array in the session. Display last 4 questions using the last 4 indexes of the array.

Member Avatar for Shanti C
0
121
Member Avatar for joeey

[QUOTE=joeey;643282]Thanks for the advice vick_rawat but it seems to be working now. I'm using $_SESSION['username'] = $username to get it working. Also is there any tutorial you can reccomand on updating the database?[/QUOTE] [url]http://w3schools.com/php/php_mysql_update.asp[/url] Google is your friend ! :)

Member Avatar for joeey
0
238
Member Avatar for besart

[QUOTE=besart;643214]Maybe I didnt explain well my problem. I am using some little cookies, where I store a user information for example: nickname and password. that is working ok. After a user signs out, these cookies will be deleted. So if the user tries to create another account from the same …

Member Avatar for R0bb0b
0
103
Member Avatar for OmniX

[quote]Can anyone tell me why this is? or more importantly tell me how to fix my configuration of mysql/php so it works?[/quote] Dude, I have told you many times already to assign the mysql_query result to a variable and return it. :confused: [code=php] function q($a) { $x = mysql_query($a); return …

Member Avatar for somedude3488
0
168
Member Avatar for akshit

[url=http://www.w3schools.com/PHP/php_mysql_select.asp] This [/url] is how you fetch the record and [url=http://www.w3schools.com/PHP/php_mysql_insert.asp] this [/url] is how you insert it.

Member Avatar for digital-ether
0
192
Member Avatar for The Dude

Lol.. Walking heart attack ! 100%.. I wish I could do this in real life without getting fired ;)

Member Avatar for sittas87
1
118
Member Avatar for pedramphp

Is it even possible without ending the identifier. [code=php] <?php echo <<<HEREDOC <div> HEREDOC; if($i==2) { echo <<<HEREDOC $i is 2 </div> HEREDOC; } [/code] I think this is the only possible way. I hope I am wrong. :) Cheers, Naveen

Member Avatar for R0bb0b
0
110
Member Avatar for Kavitha Butchi

[QUOTE=Kavitha Butchi;642490]like [code=php] //...database connections... <a href=mysql_query("DELETE FROM example WHERE age='15'")>delete</a> [/code] something like that which works..where everything is coded in a single page rather than passing it over to the other page.[/QUOTE] AFAIK, Its not possible.

Member Avatar for Kavitha Butchi
0
538
Member Avatar for tanha

I hope you have session_start in all the required pages. If so, you can try to print out the session variables first, to see if it really has the values. Try [icode] print_r($_SESSION); [/icode] in all the pages and check if the session variables are really storing any values.

Member Avatar for tanha
0
118
Member Avatar for ishlux

There is no function called equals. Have you written a function called equals ? Btw, == is the comparison operator. [icode] if($value1 == $value2) [/icode]

Member Avatar for ishlux
0
131
Member Avatar for cwarn23

Well, [code=php] <?php setcookie("user", "Alex Porter", time()+3600); setcookie("user", "", time()-3600); print "<pre>"; print_r($_COOKIE); print "</pre>"; ?> [/code] First, comment out deleting the cookie part and execute the script. Open "Tools -> Options -> Privacy -> Show cookies". You will see a cookie from localhost. Now, uncomment deleting the cookie part …

Member Avatar for nav33n
0
6K
Member Avatar for Kavitha Butchi

Well, Thats because, [icode] $_SESSION['getdisplayname']=$displayname; [/icode] is being set after you include/require outlineget.php . That is, $_SESSION['getdisplayname'] is empty on the first run. So, outlineget.php will not display anything. [quote] $conn=mysql_connect(".....") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db('db1') or die (mysql_error()); $displayname = $_SESSION['getdisplayname']; …

Member Avatar for Kavitha Butchi
0
144
Member Avatar for PatMcCrackIt

Are you planning to store the lyrics in a database ? If your answer is Yes, then all you need is one page. Just fetch the lyrics (of a particular song) and display it the way you want.

Member Avatar for nav33n
0
263
Member Avatar for OmniX
Member Avatar for FerrumBat

[code=php] $query = "SELECT * FROM freeboard where is_comment = 0 order by thread desc"; [/code] Notice that I have removed unwanted [b]'[/b].

Member Avatar for nav33n
0
174
Member Avatar for aparnesh
Member Avatar for casper_wang
0
118
Member Avatar for ditty
Member Avatar for ditty
0
218
Member Avatar for darkeinjel04
Member Avatar for nav33n
0
69
Member Avatar for mustafaneguib

[QUOTE=swatisinha.339;640465]Yes I do have one. Please pm to get the bulk coupon. Anybody interested in buying itechbids v7.0 @ 10% discount? Please use my reseller coupon: RES3215.[/QUOTE] Don't you think you have spammed enough for the day ?

Member Avatar for nav33n
0
160
Member Avatar for MDGM

[QUOTE=Spaiz;636887]Well, yes, sessions, but is there way to save user identification for long time? (except session in database/files/cookies) Maybe some new clever way? I know the ordinary one's.[/QUOTE] I don't think so..

Member Avatar for nav33n
0
122
Member Avatar for PomonaGrange

[quote] $LETTER = $_GET; [/quote] should be [code=php] $LETTER = $_GET['LETTER']; [/code] P.S. using uppercase for variable names is not preferred by most programmers :)

Member Avatar for PomonaGrange
0
271
Member Avatar for Nameste

add this to your httpd.conf file [quote] AddType application/x-httpd-php .php [/quote] and also add this line if it isn't there already. [quote] LoadModule php5_module "c:/wamp/php/php5apache2_2.dll" [/quote]

Member Avatar for nav33n
0
73
Member Avatar for jcmurphy

You can do a session check. For example, in the contact form, set a session variable, say, [icode]$_SESSION['valid'] = "true"; [/icode] In the script which does the processing, check if $_SESSION['valid'] is set and its true. If yes, then process the form. [code=php] <?php session_start(); if(isset($_SESSION['valid']) && $_SESSION['valid']=="true") { //process …

Member Avatar for nav33n
0
126
Member Avatar for chriscapetown

Try this. [code=php] $message = "Cape Town Alive - Cape Xtreme Booking Request <br> Name: ". cleanPosUrl($_POST['posName']) ."Email: ". cleanPosUrl($_POST['posEmail']) ."Staying: ". cleanPosUrl($_POST['posStaying']) ."Country:". cleanPosUrl($_POST['posCountry']) ."Contact: ". cleanPosUrl($_POST['posContact']) ."Actvity: ". cleanPosUrl($_POST['posActivity']) ."Comments: ". cleanPosUrl($_POST['posComments']); [/code] Umm.. Why are you having ; at the end of every function call ? Moreover, …

Member Avatar for nav33n
0
70
Member Avatar for ishlux
Member Avatar for ishlux

As I can see from your insert query, [quote] insert into helpdesk(email_id,firstName,lastName,phone,message) values [/quote] the column for email is email_id. But in your select query, you have email [quote] $check = "select * from helpdesk where email='email_id'"; [/quote] Next time, please use [code] tags to wrap your code.

Member Avatar for Shanti C
0
154
Member Avatar for c++ prog
Member Avatar for ditty
0
133
Member Avatar for 4x4biker

When the user logs in, add his username to the session and append the username to the upload directory and list the files.

Member Avatar for 4x4biker
0
107
Member Avatar for akshit

Just like how you do it for text fields. [icode] $value = $_POST['dropdownboxname']; [/icode]

Member Avatar for ditty
0
125
Member Avatar for shadwickman

What exception does it throw ? I don't see anything wrong with your script :S Umm.. one question though. Why don't you query the table using the condition [icode] where usern="caughtusername"; [/icode] and delete all those records ?

Member Avatar for nav33n
0
714
Member Avatar for akshit

Why so many "\n" between every line ? Anyway, [quote] I have coded this, but it shows me errors. I guess i may be mixing HTML and PHP code at some place, but am unable to figure it out... pls help me out if u can... [/quote] What are the …

Member Avatar for nav33n
0
87
Member Avatar for praveen_dusari
Member Avatar for silviuks
0
91
Member Avatar for heels

Simple.. [code=php] $txtFname = isset($_POST['txtFname'])?$_POST['txtFname']:$contact['firstName']; //if txtFname is set, then assign that value to $txtFname, else, assign $contact['firstName'] to $txtFname. [/code] and then, [code=php] First Name: <input type="text" name="txtFname" value="<? echo $txtFname; ?>" /><br /> [/code]

Member Avatar for casper_wang
0
174
Member Avatar for Venom Rush

Umm.. I don't think you can do that. ie., textbox in index.php and file tag in upload_01.php . Why don't you have them both in upload_01.php ? This works for me. [code=php] //index.php <?php print_r($_POST); ?> <table width="100%" border="0" cellpadding="5" cellspacing="0"> <tr> <td align="left" valign="top"><iframe style="border:none;" src="upload_01.php" height="650" width="600"></iframe></td> </tr> …

Member Avatar for nav33n
0
104
Member Avatar for kvdd

Convert the time into minutes(or seconds), add them in the loop, display it converting it back to the way you want !

Member Avatar for nav33n
0
112

The End.