1,741 Posted Topics
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 … | |
Re: [url]http://dev.mysql.com/doc/refman/5.0/en/date-calculations.html[/url] | |
Re: [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 | |
Re: [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 ? | |
Re: 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 … | |
Re: You can use [url=http://in2.php.net/htmlentities] htmlentities [/url] or [url=http://in.php.net/htmlspecialchars]htmlspecialchars[/url]. | |
Re: You need to post this question in javascript forum. I am sure you ll get better help there. | |
| |
Re: > 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"> … | |
Re: [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 :) | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: 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] | |
Re: 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. | |
Re: 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. | |
Re: [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 ! :) | |
Re: [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 … | |
Re: [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 … | |
Re: [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. | |
Re: Lol.. Walking heart attack ! 100%.. I wish I could do this in real life without getting fired ;) | |
Re: 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 | |
Re: [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. | |
Re: 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. | |
Re: There is no function called equals. Have you written a function called equals ? Btw, == is the comparison operator. [icode] if($value1 == $value2) [/icode] | |
Re: 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 … | |
Re: 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']; … | |
Re: 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. | |
Re: Umm.. OmniX, isn't this problem solved yet ? | |
Re: [code=php] $query = "SELECT * FROM freeboard where is_comment = 0 order by thread desc"; [/code] Notice that I have removed unwanted [b]'[/b]. | |
| |
Re: [url]http://www.w3schools.com/tags/tag_optgroup.asp[/url] Check the example. | |
Re: space ? :S I don't think I understood your problem there! | |
Re: [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 ? | |
Re: [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.. | |
Re: [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 :) | |
Re: 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] | |
Re: 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 … | |
Re: 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, … | |
Re: Do you have mysql_connect and mysql_select_db in database.php ? | |
Re: 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. | |
Re: When the user logs in, add his username to the session and append the username to the upload directory and list the files. | |
Re: Just like how you do it for text fields. [icode] $value = $_POST['dropdownboxname']; [/icode] | |
Re: 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 ? | |
Re: 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 … | |
| |
Re: 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] | |
Re: 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> … | |
Re: Convert the time into minutes(or seconds), add them in the loop, display it converting it back to the way you want ! |
The End.