Jump to content

shen

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Everything posted by shen

  1. try zencart or cube cart. this also similar to oscommerce.
  2. ok. just remove this two line from the following code. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d . and try it.
  3. Do I change /httpdocs/ to /home/site/public_html? -- Try this, if not correct then, is it a root directory then simply put / only.
  4. insertion is made only one time 4 queries are executed on registration only. but accessing of records (selection) ?
  5. Try this .htaccess file Options +FollowSymLinks <IfModule mod_php4.c> php_value session.use_trans_sid 0 php_value register_globals 1 php_value display_errors 1 </IfModule> RewriteEngine On RewriteBase /httpdocs/ // here given your uri path after given remove this comment from htaccess file RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*)/$ www.domain.com/dir/page.php?ec==$1
  6. you question is correct, but the user needs to access only the contact nos or their computer brands, instead of access the large single table, a seperate table for contacts, computer brands, is slightly faster. whenever the very large number of records are stored in a table
  7. in your code, line no. 51 function opendb() { // Open database connection. include('config.php'); extract($dbsettings); $link = mysql_connect($server, $user, $pass) or die(mysql_error()); mysql_select_db($name) or die(mysql_error()); return $link; } the function opendb, where it is called from, check the varialbes $server,$user and $pass are assigned or not.
  8. your query is correct, to avoid duplicates, after inserting a first table, get a last inserted id, and stored that id in other tables, $query = ('INSERT INTO name (fname,lname,..) VALUES ('Mary','Blige',..); ') // here, set custid as autoincrement $res = mysql_query($query)or die(mysql_error()); $custid = mysql_insert_id ($res); $query1 = ('INSERT INTO address (custid,town,parish,..) VALUES (1,'Mona','t. Andrew',..); ') $query2 = ('INSERT INTO phone (custid,cell,fax,..) VALUES (1,8760001234,8769230002,..); ') $query3 = ('INSERT INTO computer (custid,brand,type,..) VALUES (1,'Dell','Laptop',..); ') mysql_query($query1)or die(mysql_error()); mysql_query($query2)or die(mysql_error()); mysql_query($query3)or die(mysql_error());
  9. check whether, the mysql server, username and password is correct or not? if its correct, ODBC'@'localhost' instead of localhost, given ur ip address of mysql server.
  10. post your code that shows the error
  11. rewrite your code as follows echo "<ol>\n"; echo "<form action='process.php' method='POST'>\n"; $handle=opendir("files/"); while (($file = readdir($handle))!==false) { echo "<li><a href='http://www.mywebsite.com/$name/files/$file'>$file</a></li> <br>"; // $file++ == $file1; echo "<input type='checkbox' name='$file1[]' value='$file'>"; } closedir($handle); echo "</ol>\n"; echo "<input type='submit' value='Delete'>\n"; echo "</form\n"; and the process scripts is if($_POST[file1]) { $filearr = $_POST[file1]; foreach ($filearr as $value) { unlink($value); } } header("Location: http://www.google.com");
  12. Use preg_replace, it is more efficient than str_replace preg_replace("\r\n", "<br><br>", $content);
×
×
  • 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.