I love programming. I like to learn different languages. Right now I am working on learning "C". It is very different then php, but I like it.Languages I know: HTML/CSS, PHP/MySql, Actionscript, JavaScript/Ajax, PythonLearning: CFavorite…
- Interests
- Music, Ultimate Frisbee, Starcraft II, League of Legends, Running. I love to play music. My main instruments…
22 Posted Topics
Re: I like to do: [CODE] $sql = "SELECT t.*,t2.* FROM table1 t LEFT JOIN table2 t2 ON t.id = t2.id" $result= mysql_query($sql)or die (mysql_error()); while ($row = mysql_fetch_array($result)) { echo $row[title]; // or whatever else you're trying to do. } [/CODE] When using LEFT JOIN, the tables have to have … | |
Re: If you are just trying to get the current date and time for your use in PHP use the date() function. [Date - php.net](http://www.php.net/manual/en/function.date.php). If you are going to store in a database I suggest using the UNIX Timestamp, which you can call in your SQL call. | |
Re: IIM, you are wrong. Pixelsoul is 100% correct. You quoted from the manual the exact reason which counters your argument. > Remember that header() must be called **before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP**. So by placing any … | |
Re: What is your primary key for each? These table header names are pretty confusing. If you want to compare two table for related information you need to have a primary key that interconnects the two tables together. Example: There are two tables. One with all users' information and a second … | |
Re: But you can't write your code if you don't understand your equations that you'll need to utilize. From first glance, you might want to use some sort of recurssive functions. I would look at previous problems you've recently done in class. See how you dynamically allocated memory for the data … | |
Re: First and foremost.... let's talk about that first document, although unrelated to your question there is somethings that need to be addressed. You have way too many database calls for the same exact information. Call the information once and use it multiple times. You call the user database 4 times. … | |
Re: [QUOTE=Anuradha Mandal;1379744]You can use 'strrev(char *str)' function directly or you will need 2 'for' loops - one for printing the input and the other for printing the reverse such that for(i=0;i<n;i++)//To print the input for(i=n;i>0;i--)//To print the reversed string If u want to use 'strrev(char *str)' ,then u will need … | |
Re: If I were you I would make the date column based off "UNIX_TIMESTAMP()". It will convert the date into seconds, which will eliminate the need for your "time" field. (Just use date() function to convert to normal text. [URL="http://us.php.net/manual/en/function.date.php"]http://us.php.net/manual/en/function.date.php[/URL]) An example: You were going to do a status feed that … | |
Re: Like hielo said, a primary key is necessary. I would suggest making your primary key 'id' ('id' would be a numerical column that auto-increments for each entry so that they all have a unique id). Then you just make a link on your table like: [CODE] <? echo "<a href=\"www.yoursite.com/edit_phone.php?id=$row[id]\">Edit</a>"; … | |
Re: If you want to run a certain script everyday requires putting the script in your CRON processing. I personally haven't done it, but I do know it has to do with putting the script on the server and setting it up in your cron. Research 'Cron' on google perhaps? Hope … | |
Re: You forgot quotes around the sql and semicolon on line 3. [CODE] $db = "hospital"; $cxn = mysqli_connect($host,$user,$password,$db); $sql1 = "INSERT INTO intake2(site, Record, BMI, Weight) VALUES($_POST[\"site\"], $_POST[\"Record\"], $_POST[\"BMI\"], $_POST[\"Weight\"])"; $qyr = mysqli_query($cxn,$sql1); [/CODE] Hope that helps. Have a good one. | |
Re: Line 11 - This line is failing every time. The reason is that you have: [CODE]&& $contact_message == true) [/CODE] I think this might be actually checking to see if the value is "true". Try making it [CODE]if( trim($contact_name) && trim($contact_email) && trim($phone) && trim($contact_subject) && trim($contact_message))[/CODE] The trim tag … | |
Re: I can tell you two things: 1) You didn't write this code. There are 7 update statements. 2) Your problem is between lines 297 and 681. If you are getting some specific error on the screen then someone can help. | |
Re: "Programming in C" (Third Edition) by Stephen G. Kochan. Resourceful with good examples. | |
This is what my program is supposed to do: [LIST=1] [*]Print the vector (m1) [*]Print the matrix (m2) [*]Multiply the vector and matrix together and display results [/LIST] The only thing wrong with my program is that I can't quite get the right results displayed. The correct display of values … | |
Re: It's funny because I just had to do this for my programming class. You are going to have to do a series of things. Because strings are dealt with in arrays you are going to need to remove all of the spaces and punctuation marks. (My suggestion is rather than … | |
Re: My suggestion is to implement this whole process onto one file. That way once it is finished it's still on the same page and they can upload another file without having to click a back button. Change your submit button to: [CODE] <input type="submit" name="upload_file" value="Upload file"> [/CODE] and then … | |
Re: To fully show what Chrishea said: [CODE] <a href="http://www.example.com" target="_blank">Link Name</a> [/CODE] Hope this helps! Good luck! | |
Re: I am not entirely sure what you're problem is, but I would do this: [CODE] $query = "SELECT * FROM pointsprof, subject WHERE pointsprof.Total >= subject.IM206"; $result = mysql_query($query) or die(mysql_error()); echo '<form action="subjectload.php" method="POST" name="theForm" onsubmit="return validateFormOnSubmit(this)">'; echo '<table width= "200">'; while ($row = mysql_fetch_array($result)) { echo '<tr>'; echo … | |
I am currently writing a simple program that will either allow me to add music or show all of my albums, artists, and songs. The program starts in main(); then after selecting "View Music" it goes to the viewMusic() function but runs through the function and skips the getchar() for … | |
![]() | Re: This may seem stupid, but have you tried: [CODE] $sql="INSERT INTO finaltable (`value0`, `value1`, `value2`) VALUES ('$value0','$value1','$value2')"; [/CODE] [QUOTE]some times value's get inserted and other times not. [/QUOTE] Probably because the inputed text has a single quote in it, which will mess up the sql statement. I'd suggest addslashes($value) or … |
The End.