Jump to content

ViralStef

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ViralStef's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi there I have a script where you can login, and, if successful, you are redirected by javascript to your original page. But, when cookies are disabled, you have to be redirected to the URL, containing the PHPSESSID. It doesn't...The url contains all the get variables (my php script collects them and put them in an argument of the javascript function), except for the PHPSESSID-variable... It's maybe more an JavaScript issue, I don't know what is the cause of this behavior...!? Thx
  2. Solved! Thought it was something about the type, but I didn't know enough about javascript to fix it. Now it works:) Thx!
  3. Hi all I have a problem with a comparison test to check my form. It has to test if a number is larger than another number: if(form.B.value >= form.B1.value){ alert("test"); } The problem is that when B1 is for example 9 and B is 25, I get no "test"-alert. But when B1 is 10 and B is 25, It works fine... Thx for the help!! Grtz
  4. Why isn't this working: ${$afk}_basis_eff Does { and } only work for the end of variables? Thx
  5. Hm, but how can I access that database with PHP? It won't find the database, it's not placed in C:\Program Files\EasyPHP1-8\mysql\data ?
  6. Hi all I have a localhost and I want to use a database on an external hard drive, so the database is not placed in .../mysql/data/. How can I do this? Thx!
  7. Hi I have a script that generates a table. You have to type in the name of that table in an input field. If you click on the submit button, a script has to check if the table already exists. A Javascript warning should appear on the screen if the table already exists. I made already the PHP script to test if the table exists: [code]function table_exists($table_name){ $query = "SHOW TABLES LIKE '" . $table_name . "'"; $result = mysql_query($query) or die(mysql_error($query)); if(mysql_fetch_row($result)){   return true; } else{   return false; } }[/code] I only need to combine it with Javascript. Is this possible? Thx a lot! Grtz
  8. Solved:d! Indeed, primary key had to be set, and backtips had to be used! thx a lot ;D
  9. Hm, I can't find those backtips on my keyboard, but I can copy them for PHPMyAdmin. So, now I tried it with backtips and I get the following print result: [quote]CREATE TABLE `componenttest` (`ID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `Name` VARCHAR(255) NOT NULL)[/quote] But still the same error....
  10. What do you mean with backtips? Are that quotes that are not straight (like in PHPMyAdmin)? I tried this by copying those quotes from PHPMyAdmin into my script. I don't know how to type them. But I tried it, and it didn't work either:(! thx!
  11. Hi I tried it without variable declaration, but it didn't work either. Indeed, I don't want AUTO_INCREMENT on a varchar column, but does my script have that result? Thx
  12. Hi I'm trying to generate a CREATE TABLE query: [code]$createtable_query = "CREATE TABLE '$componentname' ('ID' INT(10) UNSIGNED NOT NULL AUTO_INCREMENT" . $table_string . ")"; $createtable_result = mysql_query($createtable_query) or die(mysql_error($createtable_query));[/code] $table_string is generated by the previous script. When I print $createtable_query, I get this result (just an example): [quote]CREATE TABLE 'componenttest' ('ID' INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, 'Name' VARCHAR(255) NOT NULL)[/quote] That looks like a correct query. Although, PHP warns: [quote]Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-8\www\cms\adminpanel\components\addcomponent.php on line 128[/quote] (Line 128 is "$createtable_result = ... ") What is wrong with my query? Plz help Thx
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.