• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database & view problem


I got problem with the Database and View file.
My website wasn't made by me and i paid a company to fix it and they used CodeIgniter so i need to learn it. My php/mysql knowledge is poor but im a fast learner. Now to the problem

Site: http://dack4.se

When i change something on the /view files, like adding variables or adding picture/flash stuff it doesn't show up correctly when u press at any link on the left except 'Hem'. and if u hover ur mouse over 'Om oss' u will see that the link for it is http://www.dack4.se/main/page/2 , Whats happening is that on any other url except /main/page is working correctly, on those pages it either show a white image or gives me php error codes saying Variables not found (something like that).

With phpmyadmin i can see that there is a table called 'mas_page' and then i can see all those pages.

On any other pages except those thats made in the database is working perfectly.

So what im a supposed to do? all answers will be appreciated!

Hej Moddi,

first of all please post the controller and the view code
where the error messages appear and what changes you made
to the code. I'm sure somebody will be able to help you
or at least give you a good starting point!

Gott nytt år Wink

Whats wrong in here is that first they didn't include the cargo fee but they added it later on dack4.se/cart - The correct price is marked with red colour and i wanted to fix it so it would be where "Varukorg" is to the right, where it says "Totalt: xxxx kr (and a shopping pic). And i got it to work
and it worked, on the /cart site that is but no other place.

Picture of the error code!

Cart.php (View)

<? require('header.php');?>
<div id="centerfoot">

    <div id="table-title">
        <div id="search-tabtitle">Varukorg</div>
        <div id="cart-total">
        Frakt: &lt;?=$shiping_cost+$shiping_cost_moms?&gt; kr<br/>
        <font color="red">Totalsumma: &lt;?=$scart_totaly+$shiping_cost+$shiping_cost_moms?&gt; kr</font><br/>
    <div id="table-title">    
        <div id="search-tabtitle">Betalning & Frakter</div>
    <div class="form-content">
      &lt;form id="cart-form" method="post" action="/cart/pay/"&gt;
        <div class="form-block" style="width:250px; height:20px;">
        <div class="form-block" style="height: 20px;">
                <h2>Välj Monteringsstation</h2>
        <div class="form-block" style="width:250px;">
            <select id="select-payment" name="payment" style="width:150px;">
                &lt;!--<option value="1">Kreditkort</option> --&gt;
                <option value="">V&auml;lj Betalningss&auml;tt</option>
                <option value="1">Bankgiro</option>
                <option value="2">Faktura</option>
                &lt;? if ($price>0){?&gt;
                    <option value="&lt;?=$price?&gt;">Avbetalning &lt;?=$price?&gt; kr</option>
        <div style="float:left;">
            <div class="form-block">
            <div class="form-block">
        <div class="form-block" id="workshop-desc" style="width:500px;height: auto !important;">&lt;?=$desc?&gt;</div>
        <div class="form-block" style="width:500px; height: 40px;">
            <label>Personummer (10 siffor):</label><br/>
            &lt;input type="text" id="soc_num" name="soc_num" class="text" maxlength="10"/&gt; <span style="color: red;">*</span>
        <div class="form-block" style="width:500px; height: 20px;">
            <a class="subm" id="fillbutton">Forts&auml;tt</a>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_fname" name="fname" class="text" value="&lt;?=$udata-&gt;fname?&gt;"/> <span style="color: red;">*</span>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_lname" name="lname" class="text" value="&lt;?=$udata-&gt;lname?&gt;"/> <span style="color: red;">*</span>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_email" name="email" class="text" value="&lt;?=$udata-&gt;email?&gt;"/> <span style="color: red;">*</span>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_phone" name="phone" class="text" value="&lt;?=$udata-&gt;phone?&gt;"/> <span style="color: red;">*</span>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_street" name="street" class="text" value="&lt;?=$udata-&gt;adress?&gt;"/> <span style="color: red;">*</span>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_zip" name="zip" class="text" value="&lt;?=$udata-&gt;zip?&gt;"/> <span style="color: red;">*</span>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_city" name="city" class="text" value="&lt;?=$udata-&gt;city?&gt;"/> <span style="color: red;">*</span>
        <div class="form-block" style="width:250px;">
            &lt;input type="text" id="pay_sall" name="sall" class="text"/&gt;
        <div class="form-block" style="width:500px;">
            &lt;input type="checkbox" id="pay_agree" name="agree"/&gt;
            <label id='agree_content'>Jag accepterar <a href="http://www.dack4.se/main/page/3" target="_blank">köpvillkoren</a> samt <a href="http://www.delauppbetalningen.se/kontovillkor.pdf" target="_blank">kontovillkoren</a> för delbetalning.</label>
        <div class="form-block" style="width:500px;">
            &lt;input class="bluesubm2" type="submit" value="Betala"/&gt;

    <div id="workshop-foot"></div>
&lt;? else:?&gt;
    Din kundvagn &auml;r tom.
&lt;? endif;?&gt;

But for the cart controller, i cant really share that info public. but the thing is that its actually working on /cart but not other sites, why?


There are a few possible answers for why things are happening (errors, etc.) and why the static pages are displaying correctly.

Unless someone familiar with Codeigniter goes through your site - which often entails a cost/fee for the person's time - then it would be very hard for it to be debugged remotely with so many variables.

What you may want to consider is getting a good tutorial book on Codeigniter - if you want to learn it - or any other preferred language and since you said you're a fast learner, going through that.

One of the areas you may need to look for is the use of a template solution or header files, etc

Sorry to sound negative, that isn't my intention but especially when you can't share certain parts of the site, it is a challenge for others to help. (Not saying you absolutely need to share but if you knew PHP/Codeigniter well enough, it is likely you could obscure/hide the important areas.)

well ye but i mean there got to be some way? missing variables? gotta be a file i need to write the shit down :p

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.