Jump to content

divz2

Member
  • Posts

    29
  • Joined

  • Last visited

Posts posted by divz2

  1. Can't you just use a blank action?

     

    <form action="" method="post" id="form1">

    That would cause the form to redirect to the same page for processing.

     

     

    THANK YOU. THANK YOU. :) It is working!! I was struggling so much with it. Thank you so much for your help. :) :)

  2. Hi,

    I am struggling with a form in php. I am trying to add a form by using the include function. I want to include thsi form on all pages so it would be very useful if I can save the current page name somewhere so that I can use to validate the form.

     

    For example, this is the form I am trying to include.

     

    <?php

    if(!empty($errors))

    {

    if(isset($errors['sendError']))

    {

    echo '<p><strong class="error">There was a problem with our system please contact us directly.</strong></p>';

    }

    else

    {

    echo '<p><strong class="error">Please check the form below for errors.</strong></p>';

    }

    }

    ?>

    <form action="index.php" method="post" id="form1">

    <p>

    <label><?php if(isset($errors['name'])) { echo '<span class="error">'; } ?>Name<font color="red">*</font>: <?php if(isset($errors['name'])) { echo '</span>'; } ?></label>

    <input id="search1" id="complete" type="text" value="<?php echo $form['name']; ?>" name="name" size="60" align="right" style="background:#EEF5A4" /><br />

    <label><?php if(isset($errors['company'])) { echo '<span class="error">'; } ?>Company: <?php if(isset($errors['company'])) { echo '</span>'; } ?></label>

    <input id="search1" id="complete" type="text" value="<?php echo $form['company']; ?>" name="company" size="60" align="right" /><br />

    <label><?php if(isset($errors['phone'])) { echo '<span class="error">'; } ?>Phone Number: <?php if(isset($errors['phone'])) { echo '</span>'; } ?></label>

    <input id="search1" id="complete" type="text" value="<?php echo $form['phone']; ?>" name="phone" size="60" align="right" /><br />

    <label><?php if(isset($errors['email'])) { echo '<span class="error">'; } ?>Email<font color="red">*</font>: <?php if(isset($errors['email'])) { echo '</span>'; } ?></label>

    <input id="search1" id="complete" type="text" value="<?php echo $form['email']; ?>" name="email" size="60" align="right" style="background:#EEF5A4" /><br />

    <label><?php if(isset($errors['enquiry'])) { echo '<span class="error">'; } ?>Enquiry: <?php if(isset($errors['enquiry'])) { echo '</span>'; } ?></label>

    <textarea id="search1" id="complete" textarea name="enquiry" rows=4 cols=40 value="<?php echo $form['enquiry']; ?>" name="enquiry" size="60" align="right"></textarea>

    </p>

    <p>

    <input type="submit" class="formbutton" value="Submit" /> <input type="reset" class="formbutton" value="Reset" />

    </p>

    <p><font color="red">*</font> Denotes a required field</p>

    </form>

     

    Because I am going to use this form on all pages, I would like it to include whatever the filename is rather than index.php in the first line of the form so that when the user clicks submit, it will stay on the same page but validate the form based on the mandatory fields.

     

    I don't know if the question is clear. I would very much appreciate any help at all.

     

    Thank you very much.

  3. Let me try and explain my questions clearly.

     

    Question 1: I have installed WP and added my css and index pages as a new theme in the themes folder. It is working. Now I want to add new pages to this website, how do I do it with WP?

     

    Question 2: I already designed & programmed a website www.independentsunsupport.com. I hand coded this. I have few more websites that need to be designed with the same css background (maybe just few colour changes). All these websites are similar to my www.independentsunsupport.com. The layout will be the same but the sub pages and its content will be different based on the type of product.

    How can I do this?

     

    Thank you very much indeed.

  4. Hi all,

    Thank you very much for all the replies. I am glad that WP can be used for creating/maintaining websites.

    I know its a very basic question but how can I emulate the index page and the css code I have in my website into wordpress?

    I created a my new theme folder in "themes" folder and added the index and css pages (Understood this procedure after seeing the videos on killersites website). It works but I am not sure how this same css and template can be used for other websites?

    Also how can the pages be changed in other websites without messing with the code?

    Sorry about these questions as they may seem very basic.

    Thank you very much once again.

  5. Hi,

     

    I am new to CMS/Wordpress and would like some help please. I have started programming quite few websites (all of them manually - page by page). Now I am doing much bigger websites and hand coding each page is getting more and more difficult.

    After reading your CMS forums, I downloaded Wordpress and installed it correctly. It is working now.

    I am still very confused as to how this template format can be used for websites?

    I am looking to develop websites similar to my http://www.independentsunsupport.com/ and wanted some guidance as to how Wordpress can be used.

    Any help will be very much appreciated.

    Thank you.







  6. Sun High End Server Support
    Independent Sun High-End Server Support

    Independent Sun Support is the leading Sun support provider. We have over 19 years of hands-on support experience, maintaining mission critical environments across the UK and Europe. Bulletproof your support and minimise downtime with an independent service plan from us. We have Sun certified engineers available nationwide, 24 hours a day and seven days a week. Each certified Sun engineer has specific technical knowledge to maintain the functionality of Sun servers at a performance level, that optimises data-centre efficiency and improves your ROI.


    Sun's high-end servers are designed to meet the mission critical demands of the datacenter. The Sun high-end servers provide over five times greater performance, doubled memory capacity and significantly increased I/O performance over previous generation systems.


    The new Sun SPARC Enterprise servers, feature the powerful dual core SPARC64 VI processor and provide mainframe-class RAS at open system prices. Highly scalable, with up to 24 dynamic domains and thousands of Solaris containers per system these servers enable massive server consolidation and datacenter virtualisation.






  7. Hi,

    Thank you once again for all your replies.

    I am still struggling with the forms and databases...

    How do I create a database on my host? (My website is currenly hosted by a company called Verio). I checked the control panel for the website but I cannot seem to find any database creation tool on it. :(

    Is there any other method to create a database for an online form?

    Sorry about these basic questions - I am new to all this php/mysql so struggling with the concepts.

    Also are there any tutorials that can show the step by step process.

    Thanks a lot.

  8. I am trying to collect data entered on my website (in php) into the sql databases and tables located on my local phpmyadmin.

    Or is there any other correct procedure to collect online form data?

    Can anyone please let me know what is the procedure to do this.

    Thank you.

  9. Thank you for your reply.

     

    It might be a silly question but how is the form working on localhost if the username and password are wrong? Am I missing something basic?

     

    It is updating the database in phpmyadmin when I run the form on localhost but giving error after uploading the form onto my website.

     

    Any help is very much appreciated. Thanks.

  10. Hi,

    I am trying to write code for an online form in php and mysql so that the form information will be collected in a database in phpmyadmin.

    The code is working locally (when I use localhost) but it is not working online when I upload the form onto my website. Can you please tell me what the problem is?

    Thank you very much.

     

    Form php code:

               $name = $_POST['name'];
       $company = $_POST['company'];
       $phone = $_POST['phone'];
       $email = $_POST['email'];
       $address = $_POST['address'];
    
       mysql_connect("localhost", "root", "my_password") or die('Error: '.mysql_error());
       mysql_select_db("olympic_support");
    
       $query="INSERT INTO reseller_pack (name,company,phone,email,address) VALUES ('$_POST[name]','$_POST[company]','$_POST[phone]','$_POST[email]','$_POST[address]')";
    
       mysql_query($query) or die('Error updating database');
       echo "Database updated";

     

    When I try to run the page on my website, I am getting the following error:

     

    Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /home/exquip/www/olympicsupport.com/resellerform.php on line 63

    Error: Access denied for user 'root'@'localhost' (using password: YES)

  11. Hi everyone,

     

    I am planning to create a webpage where a person can register and add images to their account. Once they are happy with the formatting of the images, they can login and buy the formatting from us.

    I have few questions:

    Which is the best way to save images into accounts based on username??

    How can customers retrieve data when they login using their username and password??

     

    Thanks a lot.

  12. Hi guys,

    I am sorry but I am still not able to connect the online form to collect data using mysql and phpmyadmin.

    This code (mentioned above) is working on local system (http://localhost) when I test it.

    So I was wondering if $dbhost='localhost'; should be changed to the correct ip address so that the data entered on the website online form will be collected into phpmyadmin.

    How will I know what is the host ip address for the phpmyadmin??

    Thanks.

  13. Hi,

    I am struggling with this problem.

    I created an online form and was hoping to collect the form info using phpmyadmin/sql. It is working when I test it locally but it is giving an error when I upload it onto my website. Can someone please help me. Thank you very much.

     

    PHP code for connecting to the database:

    <?php

    //Setting up Information

    $dbhost='localhost';

    $dbusername='root';

    $dbuserpass='my password';

    $dbname='whitePaper1';

     

    //Connect to the mysql database server

    $link_id = mysql_connect ($dbhost, $dbusername, $dbuserpass);

     

    //Create database and select the name we want to access

    $dbname=$dbusername."_".$dbname;

    if (!mysql_select_db($dbname)) die(mysql_error());

    ?>

     

    Error when I run the form and click submit:

     

    Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /home/exquip/www/olympicsupport.com/db_connect.inc on line 9

    Unknown database 'root_whitePaper1'

  14. Thank you guys for all your help. It is working now. There was some problem with the host!! As I uploaded wamp at the same time I got confused and thought the problem might be with the way I configured it.

    Thank you all anyway. :)

  15. Thank you guys for all your help.

     

    @lm: I contacted them. They are trying to see if there is any problem their end. Hope it is coz I am clueless as to what might be wrong my end!

     

    @Kaizen Maven: I tried uploading the pages in ASCII mode but the problem persists. :(

     

    Any more ideas?? Please help.

    Also can there be any problems with Apache/php/sql setup?? I recently installed wamp on my pc so don't know if that can have any effect.

    Thank you.

  16. Hi,

    I tried uploading files using FileZilla but the problem still persists. :(

    I tried both html/php files but the file size being uploaded is still zero.

    In the "failed transfers" tab, the reason for failed transfer is "Could not start transfer".

    Can anyone please suggest what the solution to this problem might be.

    Thank you.

  17. Hi,

    Thank you for your reply.

    I just realised that when I am uploading pages onto the website using ftp, it is uploading blank files (0KB).

    Can anyone tell me when this would happen? Why is ftp uploading blank files when the same file is not empty on my computer. It is still working on localhost.

    Please help. Thank you.

  18. Hi All,

    I am having some strange problem with my website. I recently uploaded wamp to get php, apache and sql installed. It is all working fine but there seems to be some problem with the web pages when I upload them onto my website using ftp.

    It is giving a blank white page when I view the pages on my website. I cannot understand what the problem might be.

    Can anyone please help me with what the problem might be. Thank you very much for your help.:(

×
×
  • Create New...