TavoxPeru
Members-
Content Count
865 -
Joined
-
Last visited
Everything posted by TavoxPeru
-
When you have the enough credits to request a free subdomain you decide which name you want, mine is similar to the example you give. Best regards,
-
First of all congrats, excellent topic, especially the one related with the variables variable. Now, i just test your code and it have an error because it doesnt shows the table with the submited data when you fill both fields, but dont worry its as simple as add an ! symbol . Simply change this line: if (empty($$name))with this one: if (!empty($$name))Best regards,
-
You are correct both of them are good ftp programs, another free one is Fresh FTP, you can find it http://www.freshwebmaster.com/ '>here. Best regards,
-
Can You Make Your Own MySQL Databases? Im an idoit
TavoxPeru replied to iGuest's topic in Programming
To complete what seec77 says i recommend that you also http://dev.mysql.com/downloads/workbench/ '>download the MySql Gui Tools. The MySql Gui Tools is a set of applications for administering MySQL Server and working with data, this includes in a single bundle all the GUI tools developed by MySql: MySQL Administrator: Tool for administer and monitor your MySql environment, database management and maintenance. MySQL QueryBrowser: Tool for working with your database data, such as creating, executing, and optimizing SQL queries. MySQL MigrationToolkit: Tool for migrate proprietary databases to MySQL. MySQL Workbench: Tool for database modeling, such design and create schemas. I'm not 100% sure that this bundle works with MySql versions prior to 5. Best regards, -
I never use Hebrew characters but your problem seems to be with the Character set of your database, i have a time ago a similar problem and i correct it by set the character set of my database to UTF-8.Best regards,
-
Let me see if i understand correctly, what do you want is to show a serial number where begins at 1 and the last serial number is equal to the total number of rows of your table????? well if it is what you want, you almost get it with my previous code. Simply change the variable $Total to starts at 1 and echoes it in the loop, then after the loop and before the table footer substract 1 to the variable $Total to show the correct number of rows of your table. $Total=1; // query to the database, you must change it to work.$query=mysql_query("select serialnumber, other_info from table_name order by serialnumber");// loop to store the datawhile($row=mysql_fetch_array($query)) { $data.=$StartRec; $data.="S/N: " . $Total . " Data: " . $row["serialnumber"] . " " . $row["other_info"] . "\n"; $data.=$EndRec; $Total++;}$Total--; Let me know if i'm correct, and change the variable names to whatever you want. Best regards,
-
Thanks everybody for take the time to reply my post, i confirm that the use of frames is the problem. I test the solutions made by saint-michael and Quatrux and it works perfect when i set the target property to _top or _parent, and when it is set to _blank it works too but the new window remains open, never works when it is not set or when it is set to _self or the name of the frame. And with the code of saint-michael if the file is under a folder like foldername/filename.ext it works but the Save File dialog assumes that the name of the file to download is the name of the script without the extension. BTW, i dont try the solution of vujsa because i'm not an expert with htaccess files. Best regards,
-
Well if i understand correctly your post, try this: <?php// Extra variables$StartRec="<tr>\n<td width='100%'>\n";$EndRec="</td>\n</tr>\n";$End="</td>\n</tr>\n</table>\n";// Table Heading$data='<table width="100%" align="center" valign="top" border="1" cellspacing="0" cellpadding="0">' ."\n";$data.="<tr>\n";$data.='<td width="100%" style="text-align:center; font-weight:bold; padding:5px">'."\n";$data.="Your Table Title";$data.=$EndRec;// Total number of records in your table, is optional, use it if you want// this one can be calculated with the mysql_num_rows() function$Total=0; // query to the database, you must change it to work.$query=mysql_query("select serialnumber, other_info from table_name order by serialnumber");// loop to store the datawhile($row=mysql_fetch_array($query)) { $data.=$StartRec; $data.="Data: " . $row["serialnumber"] . "Â " . $row["other_info"] . "\n"; $data.=$EndRec; $Total++;}// Table Footer$data.="<tr>\n";$data.='<td width="100%" style="text-align:left; font-weight:bold; padding:5px">'."\n";$data.="Total: " . $Total . " Records.\n";$data.=$End;// Show your table infoecho $data;?>As you see, it is very simple and also I don't include the code that connects to your database, and remember to modify the table name and the columns names that you want to show in your query, in this case, the $query variable. Best regards,
-
That was the first thing i have, but since that don't work i try to force the download with the header function as mention in my previous post. I make another test using your suggestion and the link still dont work, so i make another test -yes another - but this time by adding the target property to the link and it works fine the file is downloaded. I dont know why it works but i guess that it is because the original html file is loaded in an iframe. So the solution is this: <a href="download.zip" target="_blank">Download File</a>Best regards,
-
Hi, i have a problem with a zip file that i want to be force downloaded by any client, i know that with the header function it can be achieved but dont know why it doesnt works. I have two files, the first one is a simple html file with an a tag and the second is a php file, here is my code: html file: <body><a href="downpos.php">Download File</a></body>Php file: <?phpheader('Content-Type: application/zip');header('Content-Disposition: attachment; filename="file.zip"');readfile('downloads/file.zip'); ?>May be i forgot something, does it is necessary to include a call to the exit function as the last code???? Best regards,
-
Yes it is part of the PHP Core as you see it in the phpinfo() result page, also you dont need to enable anything in the php.ini file. Now, this extension should no longer be used instead the official php site recommends to use the DOM extension, that is the replacement for the DOM XML extension from PHP 4. Best regards,
-
This script will provide to your visitors a reliable print preview when they are not familliar with style sheets or don't see a 'print preview' on their browsers. You can find all the info about this script at: print-to-preview, if you cant download it please PM to send it to you. As usual its very simple to configure and use it, View the Demo here Best regards,
-
Auto Logout By Astahost Im being automatically logout by Astahost
TavoxPeru replied to yeh's topic in Web Hosting Support
Seems that it only happens to you, i dont have any trouble at all, check your cookies also. Best regards, -
Yes it is so simple and efective and works perfect, but, it only works if your column id is not a foreign key in another table, but dont worry, if you have such case simply add another SQL statement that deletes the rows referenced:<?phpmysql_query("DELETE FROM news WHERE id=$n");mysql_query("DELETE FROM table_with_fk WHERE table_with_fk.id=$n");// $n = id to delete?>Also don't forget to complete the code to update all the rows with the foreign key column in the second table when id is not equal to $i. You can also use ALTER TABLE to reset the AUTO_INCREMENT value:<?phpmysql_query("ALTER TABLE news AUTO_INCREMENT=$n");// $n = row count plus 1?>Best regards,
-
Basically I use IE 6 and Firefox 1.5x, when i view it with IE nothing happens as i said and right now i just view it with FF and works fine. When you say to overlap everything do you mean to overlap all the text that appears on your page, for example overlapping your sidebar???? May be you can use the z-index property to do that. Best regards,
-
What Is The MySQL Version @ Asta ? MySQL 4.0.26-Max<br />
TavoxPeru replied to faulty.lee's topic in Web Hosting Support
The posibilities that offers these functions are very helpul, i think that can be used in a lot of cases involving time and date calculations, such as adding or substracting date/time intervals, etc. and most important is that they are backward compatibility. I don't mind to upload either but we are not allowed to upload such things to the forum, so please email me or send me a PM. Best regards, -
I dont have any trouble, every thing works fine by my side, but something i notice is that next to the time showing the time of the last reboot of the server appears a new text, this is what cPanel shows: Last reboot 4:33, 4usersmin so, the last reboot of the server was made 4:33 hours ago, ok, but what means the text 4usersmin????? Best regards,
-
As you can see, there are a lot of ways to achieve the same result, i prefer to use winndow.location.href='http://yoursitehere.com;;'>http://yoursitehere.com;;at the begining of the page. Also, you can achieve this same functionallity using a php header function like this: <?phpHeader('Location: http://yoursitehere.com;Best regards,
-
Yes you are right, but at first sight you can get an idea of this issue by viewing the template image, of course, it is a very very vague. Best regards,
-
What Is The MySQL Version @ Asta ? MySQL 4.0.26-Max<br />
TavoxPeru replied to faulty.lee's topic in Web Hosting Support
Well first time i listen about this 2 mysql functions, that's because when i found a solution for something only sometimes i continue searching another solution And about the O'Reilly's Cookbook series i agree with you, there are really good, right now i'm reading the PHP Cookbook but i'm not sure which PHP version was used, i guess 4.x, could someone share an updated version of this book???? Best regards, -
Nice job, i like your color scheme, but check your loading time because the same happens to me as to Yordan, loading lasts too much. Best regards,
-
What Is The MySQL Version @ Asta ? MySQL 4.0.26-Max<br />
TavoxPeru replied to faulty.lee's topic in Web Hosting Support
You are welcome, and if you want a way to do it in mysql well you can check the store procedures and functions -it works since version 5.0- or you can create your own functions using the UDF interface or also you can add functions as native (built in) mysql functions, this what i found at the mysql manual: Best regards, -
Yes, what Hercco said is correct, because in most cases hosting providers disable the system function for security reasons, so i think that the solutions he proposes are better to use.Best regards,